TriggerRules Class Reference

Inheritance diagram for TriggerRules:
CheckBoxTriggerRules ContactStateTriggerRules DateTriggerRules DropDownTriggerRules MultiSelectDropDownTriggerRules NumberTriggerRules TextTriggerRules UserTriggerRules

Public Member Functions

 evaluateBeforeSave (RedBeanModel $model, $attribute)
 __construct (TriggerForWorkflowForm $trigger)
 evaluateTimeTriggerBeforeSave (RedBeanModel $model, $attribute, $changeRequiredToProcess=true)

Protected Member Functions

 sanitize ($value)

Protected Attributes


Detailed Description

Class to help the workflow engine understand how to evaluate various triggers

Definition at line 40 of file TriggerRules.php.

Constructor & Destructor Documentation

__construct ( TriggerForWorkflowForm trigger  ) 
TriggerForWorkflowForm $trigger

Definition at line 52 of file TriggerRules.php.

Member Function Documentation

evaluateTimeTriggerBeforeSave ( RedBeanModel model,
changeRequiredToProcess = true 

For a time trigger, the value must first 'change'. If the operator is TYPE_DOES_NOT_CHANGE, then we can assume true since any 'change' pushes out the time expiration. If the value does 'change', then the operator can be evaluated normally.

RedBeanModel $model
$changeRequiredToProcess - if a change in value is required to confirm the time trigger is true

Reimplemented in ConstantBasedStaticDropDownTriggerRules, CurrencyValueTriggerRules, DateTimeTriggerRules, DateTriggerRules, DropDownTriggerRules, and MultiSelectDropDownTriggerRules.

Definition at line 66 of file TriggerRules.php.

sanitize ( value  )  [protected]

Override as needed to add specific sanitization routines. Text for example, has to use strtolower


Reimplemented in CheckBoxTriggerRules, CurrencyValueTriggerRules, DecimalTriggerRules, IntegerTriggerRules, and TextTriggerRules.

Definition at line 86 of file TriggerRules.php.

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