ActionForWorkflowForm Class Reference

Inheritance diagram for ActionForWorkflowForm:
ConfigurableMetadataModel RowKeyInterface

Public Member Functions

 getRowKey ()
 isTypeAnUpdateVariant ()
 isModelActionVariant ()
 resolveAllActionAttributeFormsAndLabelsAndSort ()
 resolveAllRequiredActionAttributeFormsAndLabelsAndSort ()
 resolveAllNonRequiredActionAttributeFormsAndLabelsAndSort ()
 __construct ($modelClassName, $workflowType, $rowKey=0)
 getActionAttributeFormsCount ()
 hasActionAttributeFormByName ($attribute)
 getActionAttributeFormByName ($attribute)
 getActionAttributesAttributeFormType ($attribute)
 getActionAttributes ()
 rules ()
 attributeLabels ()
 setAttributes ($values, $safeOnly=true)
 validateType ()
 validateRelation ()
 validateRelationFilter ()
 validateRelatedModelRelation ()
 beforeValidate ()
 validateAttributes ()
 getDisplayLabel ()
 isMissingRequiredActionAttributes ()

Static Public Member Functions

static getTypeDataAndLabels ()
static getLabelForSubscribeToList ()
static getLabelForUnsubscribeFromList ()
static getTypeRelationDataAndLabels ($moduleClassName, $modelClassName, $workflowType)
static getTypeRelatedModelRelationDataAndLabels ($moduleClassName, $modelClassName, $workflowType, $relation)
static resolveFirstRelationName ($attribute)
static resolveRealAttributeName ($attribute)

Data Fields

const TYPE_UPDATE_SELF = 'Update'
const TYPE_UPDATE_RELATED = 'UpdateRelated'
const TYPE_CREATE = 'Create'
const TYPE_CREATE_RELATED = 'CreateRelated'
const TYPE_SUBSCRIBE_TO_LIST = 'SubscribeToList'
const TYPE_UNSUBSCRIBE_FROM_LIST = 'UnsubscribeFromList'
const RELATION_FILTER_ALL = 'RelationFilterAll'
const ACTION_ATTRIBUTES = 'ActionAttributes'
 $type
 $relation
 $relationFilter = self::RELATION_FILTER_ALL
 $relatedModelRelation

Protected Member Functions

 makeActionAttributeFormByAttribute ($attribute)
 resolveRealModelClassName ($attribute)
 makeModelAndResolveForRelations ()
 getModelClassNameAndResolveForRelations ()
 resolveActionAttributeFormsAndLabelsAndSortByMethod ($methodToCall)
 resolvePermissionsAttributeForm ($modelClassName, $methodToCall, array &$attributeFormsIndexedByAttribute)
 resolveActionAttributeFormsAndLabelsAndSortForSubscribeToList ()
 resolveSettingAttributesForSubscribeToListType ($valuesAttributes)

Static Protected Member Functions

static resolveErrorAttributePrefix ($attributeName)

Detailed Description

Class that defines the actions used for a workflow

Definition at line 40 of file ActionForWorkflowForm.php.


Constructor & Destructor Documentation

__construct ( modelClassName,
workflowType,
rowKey = 0 
)
Parameters:
string $modelClassName

Definition at line 277 of file ActionForWorkflowForm.php.


Member Function Documentation

static getTypeDataAndLabels (  )  [static]
Returns:
array

Definition at line 134 of file ActionForWorkflowForm.php.

static getTypeRelationDataAndLabels ( moduleClassName,
modelClassName,
workflowType 
) [static]
Parameters:
string $moduleClassName
string $modelClassName
string $workflowType
Returns:
array

Definition at line 162 of file ActionForWorkflowForm.php.

static getTypeRelatedModelRelationDataAndLabels ( moduleClassName,
modelClassName,
workflowType,
relation 
) [static]
Parameters:
string $moduleClassName
string $modelClassName
string $workflowType
string $relation
Returns:
array

Definition at line 185 of file ActionForWorkflowForm.php.

getRowKey (  ) 
Returns:
int

Implements RowKeyInterface.

Definition at line 209 of file ActionForWorkflowForm.php.

isTypeAnUpdateVariant (  ) 
Returns:
bool
Exceptions:
NotSupportedException 

Definition at line 218 of file ActionForWorkflowForm.php.

resolveAllActionAttributeFormsAndLabelsAndSort (  ) 
Returns:
array

Definition at line 246 of file ActionForWorkflowForm.php.

resolveAllRequiredActionAttributeFormsAndLabelsAndSort (  ) 
Returns:
array

Definition at line 254 of file ActionForWorkflowForm.php.

resolveAllNonRequiredActionAttributeFormsAndLabelsAndSort (  ) 
Returns:
array

Definition at line 269 of file ActionForWorkflowForm.php.

getActionAttributeFormsCount (  ) 
Returns:
int

Definition at line 290 of file ActionForWorkflowForm.php.

hasActionAttributeFormByName ( attribute  ) 
Parameters:
$attribute 
Returns:
bool

Definition at line 299 of file ActionForWorkflowForm.php.

getActionAttributeFormByName ( attribute  ) 
Parameters:
$attribute 
Returns:
mixed
Exceptions:
NotFoundException if the attribute does not exist

Definition at line 317 of file ActionForWorkflowForm.php.

getActionAttributesAttributeFormType ( attribute  ) 
Parameters:
string $attribute
Returns:
string

Definition at line 334 of file ActionForWorkflowForm.php.

getActionAttributes (  ) 
Returns:
array

Definition at line 353 of file ActionForWorkflowForm.php.

rules (  ) 
Returns:
array

Definition at line 361 of file ActionForWorkflowForm.php.

attributeLabels (  ) 
Returns:
array

Definition at line 379 of file ActionForWorkflowForm.php.

setAttributes ( values,
safeOnly = true 
)

Process all attributes except 'attributes' first since the 'attributes' requires the 'type' to be set

Parameters:
$values 
bool $safeOnly

Definition at line 389 of file ActionForWorkflowForm.php.

validateType (  ) 
Returns:
bool

Definition at line 408 of file ActionForWorkflowForm.php.

validateRelation (  ) 
Returns:
bool

Definition at line 423 of file ActionForWorkflowForm.php.

validateRelationFilter (  ) 
Returns:
bool

Definition at line 441 of file ActionForWorkflowForm.php.

validateRelatedModelRelation (  ) 
Returns:
bool

Definition at line 458 of file ActionForWorkflowForm.php.

beforeValidate (  ) 
Returns:
bool

Definition at line 475 of file ActionForWorkflowForm.php.

validateAttributes (  ) 
Returns:
bool

Definition at line 487 of file ActionForWorkflowForm.php.

static resolveFirstRelationName ( attribute  )  [static]

Resolves the first relation if it exists for attributes such as primaryAddress___street2. If the attribute is in fact a real non-related attribute, then it will return null.

Parameters:
string attribute
Returns:
real model attribute name. Parses for primaryAddress___street1 for example
Exceptions:
NotSupportedException() if invalid $attribute string

Definition at line 513 of file ActionForWorkflowForm.php.

static resolveRealAttributeName ( attribute  )  [static]

Resolves the real attribute for dynamic attributes such as owner__User or primaryAddress___street2

Parameters:
string attribute
Returns:
real model attribute name. Parses for primaryAddress___street1 for example
Exceptions:
NotSupportedException() if invalid $attribute string

Definition at line 539 of file ActionForWorkflowForm.php.

getDisplayLabel (  ) 
Returns:
string
Exceptions:
NotSupportedException 

Definition at line 574 of file ActionForWorkflowForm.php.

isMissingRequiredActionAttributes (  ) 

Detects if an existing action has missing action attributes. This can happen if an existing workflow exists and a change is made in designer that makes a new required custom attribute for example.

Returns:
boolean

Definition at line 616 of file ActionForWorkflowForm.php.

makeActionAttributeFormByAttribute ( attribute  )  [protected]
Parameters:
string $attribute
Returns:
WorkflowActionAttributeForm

Definition at line 635 of file ActionForWorkflowForm.php.

static resolveErrorAttributePrefix ( attributeName  )  [static, protected]
Parameters:
string $attributeName
Returns:
string

Definition at line 648 of file ActionForWorkflowForm.php.

resolveRealModelClassName ( attribute  )  [protected]
Parameters:
string attribute
Returns:
real model class name. Parses for primaryAddress___street1 for example
Exceptions:
NotSupportedException() if invalid $attribute string

Definition at line 659 of file ActionForWorkflowForm.php.

makeModelAndResolveForRelations (  )  [protected]
Returns:
RedBeanModel

Definition at line 683 of file ActionForWorkflowForm.php.

getModelClassNameAndResolveForRelations (  )  [protected]
Returns:
string
Exceptions:
NotSupportedException 

Definition at line 693 of file ActionForWorkflowForm.php.

resolveActionAttributeFormsAndLabelsAndSortByMethod ( methodToCall  )  [protected]
Parameters:
string $methodToCall
Returns:
array

Definition at line 723 of file ActionForWorkflowForm.php.


Field Documentation

const TYPE_UPDATE_SELF = 'Update'

This action is if you trigger an account and then update attributes in that same account for example.

Definition at line 45 of file ActionForWorkflowForm.php.

const TYPE_UPDATE_RELATED = 'UpdateRelated'

This action is if you trigger an account and then update attributes in the related contacts

Definition at line 50 of file ActionForWorkflowForm.php.

const TYPE_CREATE = 'Create'

This action is if you trigger an account and then create a related task

Definition at line 55 of file ActionForWorkflowForm.php.

const TYPE_CREATE_RELATED = 'CreateRelated'

This action is if you trigger an account and then create a task against a related contact

Definition at line 60 of file ActionForWorkflowForm.php.

const TYPE_SUBSCRIBE_TO_LIST = 'SubscribeToList'

This action is if you trigger a contact model and then want to subscribe the contact to a marketing list

Definition at line 65 of file ActionForWorkflowForm.php.

const TYPE_UNSUBSCRIBE_FROM_LIST = 'UnsubscribeFromList'

This action is if you trigger a contact model and then want to unsubscribe the contact from a marketing list

Definition at line 70 of file ActionForWorkflowForm.php.

const RELATION_FILTER_ALL = 'RelationFilterAll'

When performing actions on related models, if there are MANY related models RELATION_FILTER_ALL means the action will be performed on all related models

Definition at line 76 of file ActionForWorkflowForm.php.

const ACTION_ATTRIBUTES = 'ActionAttributes'

Utilized by arrays to define the element that is for the actionAttributes

Definition at line 81 of file ActionForWorkflowForm.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Mon Apr 24 07:10:22 2017