All Data Structures Functions Variables Pages
Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
WorkflowActionAttributeForm Class Reference
Inheritance diagram for WorkflowActionAttributeForm:
ConfigurableMetadataModel CheckBoxWorkflowActionAttributeForm ContactStateWorkflowActionAttributeForm CurrencyValueWorkflowActionAttributeForm CustomFieldWorkflowActionAttributeForm DecimalWorkflowActionAttributeForm DurationEnabledWorkflowActionAttributeForm EmailWorkflowActionAttributeForm ExplicitReadWriteModelPermissionsWorkflowActionAttributeForm IntegerWorkflowActionAttributeForm MarketingListWorkflowActionAttributeForm ProductTemplatePriceFrequencyDropDownWorkflowActionAttributeForm ProductTemplateStatusDropDownWorkflowActionAttributeForm ProductTemplateTypeDropDownWorkflowActionAttributeForm ProjectStatusDropDownWorkflowActionAttributeForm StatusDropDownWorkflowActionAttributeForm TaskStatusDropDownWorkflowActionAttributeForm TextAreaWorkflowActionAttributeForm TextWorkflowActionAttributeForm UrlWorkflowActionAttributeForm UserWorkflowActionAttributeForm

Public Member Functions

 getValueElementType ()
 
 __construct ($modelClassName, $modelAttributeName)
 
 getAlternateValue ()
 
 getDisplayLabel ()
 
 getStringifiedModelForValue ()
 
 setDisplayLabel ($displayLabel)
 
 getModelClassName ()
 
 getModelAttributeName ()
 
 rules ()
 
 attributeLabels ()
 
 validateValue ()
 
 getTypeValuesAndLabels ($isCreatingNewModel, $isRequired)
 
 resolveValueAndSetToModel (WorkflowActionProcessingModelAdapter $adapter, $attribute)
 
 shouldSetNullAlternativeValue ()
 
 resolveNullAlternativeValueAndSetToModel (WorkflowActionProcessingModelAdapter $adapter, $attribute)
 

Static Public Member Functions

static getFormType ()
 
static resolveValueBeforeSave ()
 

Data Fields

const TYPE_STATIC = 'Static'
 
const TYPE_STATIC_NULL = 'StaticNull'
 
 $type
 
 $value
 
 $shouldSetValue
 

Protected Member Functions

 makeTypeValuesAndLabels ($isCreatingNewModel, $isRequired)
 
 resolveValueForMergeTags ($value, WorkflowActionProcessingModelAdapter $adapter)
 

Protected Attributes

 $stringifiedModelForValue
 
 $modelClassName
 
 $modelAttributeName
 
 $displayLabel
 
 $shouldResolveValueForMergeTags = false
 

Detailed Description

Base class for working with action attributes.

Definition at line 40 of file WorkflowActionAttributeForm.php.

Constructor & Destructor Documentation

__construct (   $modelClassName,
  $modelAttributeName 
)
Parameters
string$modelClassName
string$modelAttributeName

Definition at line 125 of file WorkflowActionAttributeForm.php.

Member Function Documentation

static getFormType ( )
static
Returns
string - If the class name is BooleanWorkflowActionAttributeForm, then 'Boolean' will be returned.

Definition at line 105 of file WorkflowActionAttributeForm.php.

static resolveValueBeforeSave ( )
static

Return true if the actionAttribute should resolve value before save. If false, it will resolve value afterSave

Returns
bool

Definition at line 116 of file WorkflowActionAttributeForm.php.

getAlternateValue ( )

Method needed so the validation routines can properly interact with the alternateValue and properly set the correct errors.

Returns
mixed

Definition at line 138 of file WorkflowActionAttributeForm.php.

getDisplayLabel ( )
Returns
string

Definition at line 146 of file WorkflowActionAttributeForm.php.

getStringifiedModelForValue ( )
Returns
string

Definition at line 154 of file WorkflowActionAttributeForm.php.

setDisplayLabel (   $displayLabel)
Parameters
$displayLabel

Definition at line 162 of file WorkflowActionAttributeForm.php.

getModelClassName ( )
Returns
string

Definition at line 171 of file WorkflowActionAttributeForm.php.

getModelAttributeName ( )
Returns
string

Definition at line 179 of file WorkflowActionAttributeForm.php.

rules ( )

Override to properly handle retrieving rule information from the model for the attribute name.

Definition at line 187 of file WorkflowActionAttributeForm.php.

attributeLabels ( )
Returns
array

Definition at line 207 of file WorkflowActionAttributeForm.php.

validateValue ( )

Value is required based on the type. Override in children as needed to add more scenarios.

Returns
bool

Definition at line 216 of file WorkflowActionAttributeForm.php.

getTypeValuesAndLabels (   $isCreatingNewModel,
  $isRequired 
)
Parameters
bool$isCreatingNewModel
bool$isRequiredIs the attribute required or not. Some types are not available if the attribute is required.
Returns
array

Definition at line 232 of file WorkflowActionAttributeForm.php.

resolveValueAndSetToModel ( WorkflowActionProcessingModelAdapter  $adapter,
  $attribute 
)

Utilized to create or update model attribute values after a workflow's triggers are fired as true.

Parameters
WorkflowActionProcessingModelAdapter$adapter
$attribute
Exceptions
NotSupportedException

Definition at line 245 of file WorkflowActionAttributeForm.php.

resolveNullAlternativeValueAndSetToModel ( WorkflowActionProcessingModelAdapter  $adapter,
  $attribute 
)

In the event that the value is not being set, sometimes an attribute still requires an alternative to null. An example is boolean where the default value should be 0 not NULL. Same is true with dateTime, and date where the default values should be 0000-00-00 00:00:00 and 0000-00-00 respectively.

Parameters
WorkflowActionProcessingModelAdapter$adapter
$attribute
Exceptions
NotSupportedException

Definition at line 280 of file WorkflowActionAttributeForm.php.


The documentation for this class was generated from the following file:
Generated on Sat Jun 6 2020 07:11:11