All Data Structures Functions Variables Pages
Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Static Protected Member Functions
ActionForWorkflowForm Class Reference
Inheritance diagram for ActionForWorkflowForm:
ConfigurableMetadataModel RowKeyInterface

Public Member Functions

 getRowKey ()
 
 isTypeAnUpdateVariant ()
 
 isModelActionVariant ()
 
 isModelCommentActionVariant ()
 
 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 getLabelForCreateComment ()
 
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 TYPE_CREATE_COMMENT = 'CreateComment'
 
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 ()
 
 resolveActionAttributeFormsAndLabelsAndSortForCreateComment ()
 
 resolveSettingAttributesForSubscribeToListType ($valuesAttributes)
 
 resolveTooltipHelpContentByElementType ($model, $attribute)
 

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 308 of file ActionForWorkflowForm.php.

Member Function Documentation

static getTypeDataAndLabels ( )
static
Returns
array

Definition at line 139 of file ActionForWorkflowForm.php.

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

Definition at line 173 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 196 of file ActionForWorkflowForm.php.

getRowKey ( )
Returns
int

Implements RowKeyInterface.

Definition at line 220 of file ActionForWorkflowForm.php.

isTypeAnUpdateVariant ( )
Returns
bool
Exceptions
NotSupportedException

Definition at line 229 of file ActionForWorkflowForm.php.

isModelCommentActionVariant ( )

Used to find out if action is related to adding comments to model This function is used in ActionRowForWorkflowComponentView::resolveAndRenderActionContent to resolve if we should show merge tags guide, which should be present for comments.

Returns
bool

Definition at line 261 of file ActionForWorkflowForm.php.

resolveAllActionAttributeFormsAndLabelsAndSort ( )
Returns
array

Definition at line 273 of file ActionForWorkflowForm.php.

resolveAllRequiredActionAttributeFormsAndLabelsAndSort ( )
Returns
array

Definition at line 281 of file ActionForWorkflowForm.php.

resolveAllNonRequiredActionAttributeFormsAndLabelsAndSort ( )
Returns
array

Definition at line 300 of file ActionForWorkflowForm.php.

getActionAttributeFormsCount ( )
Returns
int

Definition at line 321 of file ActionForWorkflowForm.php.

hasActionAttributeFormByName (   $attribute)
Parameters
$attribute
Returns
bool

Definition at line 330 of file ActionForWorkflowForm.php.

getActionAttributeFormByName (   $attribute)
Parameters
$attribute
Returns
mixed
Exceptions
NotFoundExceptionif the attribute does not exist

Definition at line 348 of file ActionForWorkflowForm.php.

getActionAttributesAttributeFormType (   $attribute)
Parameters
string$attribute
Returns
string

Definition at line 365 of file ActionForWorkflowForm.php.

getActionAttributes ( )
Returns
array

Definition at line 388 of file ActionForWorkflowForm.php.

rules ( )
Returns
array

Definition at line 396 of file ActionForWorkflowForm.php.

attributeLabels ( )
Returns
array

Definition at line 414 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 424 of file ActionForWorkflowForm.php.

validateType ( )
Returns
bool

Definition at line 443 of file ActionForWorkflowForm.php.

validateRelation ( )
Returns
bool

Definition at line 459 of file ActionForWorkflowForm.php.

validateRelationFilter ( )
Returns
bool

Definition at line 477 of file ActionForWorkflowForm.php.

validateRelatedModelRelation ( )
Returns
bool

Definition at line 494 of file ActionForWorkflowForm.php.

beforeValidate ( )
Returns
bool

Definition at line 511 of file ActionForWorkflowForm.php.

validateAttributes ( )
Returns
bool

Definition at line 523 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
stringattribute
Returns
real model attribute name. Parses for primaryAddress___street1 for example
Exceptions
NotSupportedException()if invalid $attribute string

Definition at line 549 of file ActionForWorkflowForm.php.

static resolveRealAttributeName (   $attribute)
static

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

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

Definition at line 575 of file ActionForWorkflowForm.php.

getDisplayLabel ( )
Returns
string
Exceptions
NotSupportedException

Definition at line 610 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 653 of file ActionForWorkflowForm.php.

makeActionAttributeFormByAttribute (   $attribute)
protected
Parameters
string$attribute
Returns
WorkflowActionAttributeForm

Definition at line 672 of file ActionForWorkflowForm.php.

static resolveErrorAttributePrefix (   $attributeName)
staticprotected
Parameters
string$attributeName
Returns
string

Definition at line 685 of file ActionForWorkflowForm.php.

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

Definition at line 696 of file ActionForWorkflowForm.php.

makeModelAndResolveForRelations ( )
protected
Returns
RedBeanModel

Definition at line 720 of file ActionForWorkflowForm.php.

getModelClassNameAndResolveForRelations ( )
protected
Returns
string
Exceptions
NotSupportedException

Definition at line 730 of file ActionForWorkflowForm.php.

resolveActionAttributeFormsAndLabelsAndSortByMethod (   $methodToCall)
protected
Parameters
string$methodToCall
Returns
array

Definition at line 761 of file ActionForWorkflowForm.php.

resolveTooltipHelpContentByElementType (   $model,
  $attribute 
)
protected
Parameters
RedBeanModel$model
string$attribute
Returns
null|string

Definition at line 886 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 TYPE_CREATE_COMMENT = 'CreateComment'

This action is if you trigger a account/contact/opportunity/task model and want to create comment

Definition at line 75 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 81 of file ActionForWorkflowForm.php.

const ACTION_ATTRIBUTES = 'ActionAttributes'

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

Definition at line 86 of file ActionForWorkflowForm.php.


The documentation for this class was generated from the following file:
Generated on Sat May 30 2020 07:10:38