WorkflowTriggersUtil Class Reference

Static Public Member Functions

static areTriggersTrueBeforeSave (Workflow $workflow, RedBeanModel $model)
static areTriggersTrueOnByTimeWorkflowQueueJob (Workflow $workflow, RedBeanModel $model)
static resolveStructureToPHPString ($triggersStructure)
static resolveBooleansDataToPHPString ($structureAsPHPString, Array $dataToEvaluate)

Static Protected Member Functions

static evaluatePHPString ($phpStringReadyToEvaluate)
static resolveTimeTriggerIsTrueBeforeSave (Workflow $workflow, RedBeanModel $model)
static resolveTriggersAreTrueBeforeSave (Workflow $workflow, RedBeanModel $model)
static resolveByTimeTriggerIsTrueBeforeSave (Workflow $workflow, RedBeanModel $model)
static isTriggerTrueByModel (Workflow $workflow, TriggerForWorkflowForm $trigger, RedBeanModel $model)
static resolveRelatedModelsForInferredRelations ($attribute, $model, $relation, $resolvedAttributeModelClassName)
static resolveIsTrueByEvaluationRules (Workflow $workflow, TriggerForWorkflowForm $trigger, RedBeanModel $model, $attribute)

Detailed Description

Helper class for working with Workflow objects and processing the triggers against a model

Definition at line 40 of file WorkflowTriggersUtil.php.


Member Function Documentation

static areTriggersTrueBeforeSave ( Workflow workflow,
RedBeanModel model 
) [static]
Parameters:
Workflow $workflow
RedBeanModel $model
Returns:
bool
Exceptions:
NotSupportedException 

Definition at line 48 of file WorkflowTriggersUtil.php.

static areTriggersTrueOnByTimeWorkflowQueueJob ( Workflow workflow,
RedBeanModel model 
) [static]

Utilized during

See also:
ByTimeWorkflowQueueJob to process workflows that are by-time
Parameters:
Workflow $workflow
RedBeanModel $model
Returns:
bool
Exceptions:
NotSupportedException 

Definition at line 71 of file WorkflowTriggersUtil.php.

static resolveStructureToPHPString ( triggersStructure  )  [static]
Parameters:
$triggersStructure 
Returns:
mixed

Definition at line 91 of file WorkflowTriggersUtil.php.

static resolveBooleansDataToPHPString ( structureAsPHPString,
Array $  dataToEvaluate 
) [static]
Parameters:
$structureAsPHPString 
array $dataToEvaluate
Returns:
mixed
Exceptions:
NotSupportedException 

Definition at line 104 of file WorkflowTriggersUtil.php.

static evaluatePHPString ( phpStringReadyToEvaluate  )  [static, protected]

Evaluates the string.

Parameters:
$phpStringReadyToEvaluate 
Returns:
bool
Exceptions:
InvalidArgumentException 

Definition at line 125 of file WorkflowTriggersUtil.php.

static resolveTimeTriggerIsTrueBeforeSave ( Workflow workflow,
RedBeanModel model 
) [static, protected]
Parameters:
Workflow $workflow
RedBeanModel $model
Returns:
bool
Exceptions:
NotSupportedException 

Definition at line 149 of file WorkflowTriggersUtil.php.

static resolveTriggersAreTrueBeforeSave ( Workflow workflow,
RedBeanModel model 
) [static, protected]
Parameters:
Workflow $workflow
RedBeanModel $model
Returns:
bool|void

Definition at line 163 of file WorkflowTriggersUtil.php.

static resolveByTimeTriggerIsTrueBeforeSave ( Workflow workflow,
RedBeanModel model 
) [static, protected]

First check the time trigger specifically. In the case of date/dateTime, it should just check if the value has 'changed'. For other attributes, it should check if the value has 'changed' and mactches the condition of the time trigger. If the time trigger is true, then it will evaluate the rest of the triggers.

Parameters:
Workflow $workflow
RedBeanModel $model
Returns:
bool|void

Definition at line 191 of file WorkflowTriggersUtil.php.

static isTriggerTrueByModel ( Workflow workflow,
TriggerForWorkflowForm trigger,
RedBeanModel model 
) [static, protected]
Parameters:
Workflow $workflow
TriggerForWorkflowForm $trigger
RedBeanModel $model
Returns:
bool
Exceptions:
NotSupportedException 

Definition at line 207 of file WorkflowTriggersUtil.php.

static resolveIsTrueByEvaluationRules ( Workflow workflow,
TriggerForWorkflowForm trigger,
RedBeanModel model,
attribute 
) [static, protected]
Parameters:
Workflow $workflow
TriggerForWorkflowForm $trigger
RedBeanModel $model
string $attribute
Returns:
bool
Exceptions:
NotSupportedException 

Definition at line 327 of file WorkflowTriggersUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Fri Mar 24 07:10:32 2017