Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • None
  • system
    • base
    • caching
    • console
    • db
      • ar
      • schema
    • validators
    • web
      • actions
      • auth
      • helpers
      • widgets
        • captcha
        • pagers
  • zii
    • widgets
      • grid

Classes

  • X2FlowAction
  • X2FlowItem
  • X2FlowTrigger
  • X2FlowTriggerBehavior
  • Overview
  • Package
  • Class
  • Tree

Class X2FlowTrigger

Color utilities (unused)

CComponent
Extended by X2FlowItem
Extended by X2FlowTrigger

Direct known subclasses

ActionCompleteTrigger, ActionOverdueTrigger, EmailOpenTrigger, InboundEmailTrigger, MacroTrigger, MultiChildNode, OutboundEmailTrigger, RecordCreateTrigger, RecordDeleteTrigger, RecordUpdateTrigger, RecordViewTrigger, ActionUncompleteTrigger, BaseTagTrigger, BaseUserTrigger, BaseWorkflowStageTrigger, BaseWorkflowTrigger, CampaignEmailClickTrigger, CampaignEmailOpenTrigger, CampaignUnsubscribeTrigger

Indirect known subclasses

RecordTagAddTrigger, RecordTagRemoveTrigger, X2FlowSplitter, X2FlowSwitch, UserLoginTrigger, UserLogoutTrigger, WebleadTrigger, WorkflowCompleteStageTrigger, WorkflowCompleteTrigger, WorkflowRevertStageTrigger, WorkflowStartStageTrigger, WorkflowStartTrigger
Abstract
Package: application\components\x2flow
Located at x2engine/protected/components/x2flow/triggers/X2FlowTrigger.php
Methods summary
public static array
# getFieldComparisonOptions( )

Returns

array
all standard comparison operators
public static
# getGenericConditions( )
public static
# getGenericCondition( mixed $type )
public
# getDefaultReturnVal( mixed $flowId )

Can be overriden in child class to give flow a default return value

Can be overriden in child class to give flow a default return value

public
# afterValidate( mixed & $params, mixed $defaultErrMsg = '', mixed $flowId )

Can be overriden in child class to extend behavior of validate method

Can be overriden in child class to extend behavior of validate method

public
# validate( mixed & $params = array(), mixed $flowId = null )

Checks if all all the params are ship-shape

Checks if all all the params are ship-shape

public array
# check( mixed & $params )

Default condition processor for main config panel. Checks each option against the key in $params of the same name, using an operator if provided (defaults to "=")

Default condition processor for main config panel. Checks each option against the key in $params of the same name, using an operator if provided (defaults to "=")

Returns

array
(error status, message)
public array
# checkConditions( mixed & $params )

Tests this trigger's conditions against the provided params.

Tests this trigger's conditions against the provided params.

Returns

array
(error status, message)
public static boolean
# checkWorkflowStatusCondition( Array $condition, Array & $params )

Used to check workflow status condition

Used to check workflow status condition

Parameters

$condition
Array
$condition
$params
Array
$params

Returns

boolean
true for success, false otherwise
public static boolean
# checkCondition( Array $condition, Array & $params )

Parameters

$condition
Array
$condition
$params
Array
$params

Returns

boolean
true for success, false otherwise
protected static
# parseArray( mixed $operator, mixed $value )
public static boolean
# evalComparison( mixed $subject, string $operator, mixed $value = null, Fields $field = null )

Parameters

$subject
mixed
$subject if applicable, the value to compare $subject with (value of model attribute)
$operator
string
$operator the type of comparison to be used
$value
mixed
$value the value being analyzed (specified in config menu)
$field

Returns

boolean
protected static array
# tokenize( string $str )

Breaks a string expression into an array of 2-element arrays (type, value) using X2FlowTrigger::$_tokenChars and X2FlowTrigger::$_tokenRegex to identify tokens

Breaks a string expression into an array of 2-element arrays (type, value) using X2FlowTrigger::$_tokenChars and X2FlowTrigger::$_tokenRegex to identify tokens

Parameters

$str
string
$str the input expression

Returns

array
a flat array of tokens
protected static
# addNode( array & $tree, array $nodePath, mixed $value )

Adds a new node at the end of the specified branch

Adds a new node at the end of the specified branch

Parameters

$tree
array
&$tree the tree object
$nodePath
array
$nodePath array of branch indeces leading to the target branch
$value

Value

array an array containing the new node's type and value
protected static
# simplifyNode( array & $tree, array $nodePath )

Checks if this branch has only one node and eliminates it by moving the child node up one level

Checks if this branch has only one node and eliminates it by moving the child node up one level

Parameters

$tree
array
&$tree the tree object
$nodePath
array
$nodePath array of branch indeces leading to the target node
public static mixed
# parseExpressionTree( String $str )

Parameters

$str
String
$str string to be parsed into an expression tree

Returns

mixed
a variable depth array containing pairs of entity types and values, or a string containing an error message
public static
# getTriggerTypes( string $queryProperty = False, mixed $queryValue = False )

Gets all X2Flow trigger types.

Gets all X2Flow trigger types.

Optionally constrains the list to those with a property matching a value.

Parameters

$queryProperty
string
$queryProperty The property of each trigger to test
$queryValue
mixed
$queryValue The value to match trigger against
public static string
# getTriggerTitle( string $triggerType )

Gets X2Flow trigger title.

Gets X2Flow trigger title.

Parameters

$triggerType
string
$triggerType The trigger class name

Returns

string
the empty string or the title of the trigger with the given class name
public static
# getTriggerInstances( )
Methods inherited from X2FlowItem
calculateTimeOffset(), create(), getInstances(), getParamRules(), getTitle(), paramRules(), parseOption(), validateDropdown(), validateEmail(), validateOptions()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Constants inherited from X2FlowItem
VALIDATION_WARNING
Properties summary
public string $notifType ''
#

$var string the type of notification to create

$var string the type of notification to create

public string $eventType ''
#

$var string the type of event to create

$var string the type of event to create

public static array $genericConditions array( 'attribute' => 'Compare Attribute', 'workflow_status' => 'Process Status', 'current_user' => 'Current User', 'month' => 'Current Month', 'day_of_week' => 'Day of Week', 'day_of_month' => 'Day of Month', 'time_of_day' => 'Time of Day', 'current_time' => 'Current Time', 'user_active' => 'User Logged In', 'on_list' => 'On List', 'has_tags' => 'Has Tags', 'email_open' => 'Email Opened', // 'workflow_status' => 'Workflow Status', // 'current_local_time' => ''), )
#
protected static array $_tokenChars array( ',' => 'COMMA', '{' => 'OPEN_BRACKET', '}' => 'CLOSE_BRACKET', '+' => 'ADD', '-' => 'SUBTRACT', '*' => 'MULTIPLY', '/' => 'DIVIDE', '%' => 'MOD', // '(' => 'OPEN_PAREN', // ')' => 'CLOSE_PAREN', )
#
protected static array $_tokenRegex array( '\d+\.\d+\b|^\.?\d+\b' => 'NUMBER', '[a-zA-Z]\w*\.[a-zA-Z]\w*' => 'VAR_COMPLEX', '[a-zA-Z]\w*' => 'VAR', '\s+' => 'SPACE', '.' => 'UNKNOWN', )
#
Properties inherited from X2FlowItem
$_instances, $config, $info, $label, $requiresCron
X2CRM Documentation API documentation generated by ApiGen 2.8.0