Class WorkflowScenario
Helper class to create workflow scenario names.
Methods summary
public static
string
|
#
changeStatus( string $start, string $end )
Returns the scenario name for a change status action.
Returns the scenario name for a change status action.
Parameters
- $start
- the absolute start status Id
- $end
- the absolute end status Id
Returns
string the scenario name
Throws
|
public static
string
|
#
leaveStatus( string $status = raoul2000\workflow\validation\WorkflowScenario::ANY_STATUS )
Returns the scenario name for a leave status action.
If no argument is passed to this method, it returns a scenario name
that matched any status leave.
Returns the scenario name for a leave status action.
If no argument is passed to this method, it returns a scenario name
that matched any status leave.
Parameters
- $status
- the aboslute id of the status that is left
Returns
string the scenario name
|
public static
string
|
#
enterStatus( string $status = raoul2000\workflow\validation\WorkflowScenario::ANY_STATUS )
Returns the scenario name for a enter status action.
If no argument is passed to this method, it returns a scenario name
that matched any status entrance.
Returns the scenario name for a enter status action.
If no argument is passed to this method, it returns a scenario name
that matched any status entrance.
Parameters
- $status
- the aboslute id of the entered status
Returns
string the scenario name
|
public static
string
|
#
enterWorkflow( string $workflowId = raoul2000\workflow\validation\WorkflowScenario::ANY_WORKFLOW )
Returns the scenario name for a enter workflow action.
If no argument is passed to this method, the scenario name returned matches
enter in any workflow.
Returns the scenario name for a enter workflow action.
If no argument is passed to this method, the scenario name returned matches
enter in any workflow.
Parameters
- $workflowId
- the workflow id
Returns
string the scenario name
|
public static
string
|
#
leaveWorkflow( string $workflowId = raoul2000\workflow\validation\WorkflowScenario::ANY_WORKFLOW )
Returns the scenario name for a leave workflow action.
If no argument is passed to this method, the scenario name returned matches
leaving any workflow.
Returns the scenario name for a leave workflow action.
If no argument is passed to this method, the scenario name returned matches
leaving any workflow.
Parameters
- $workflowId
- the workflow id
Returns
string the scenario name
|
public static
boolean
|
#
match( string $scenario1, string $scenario2 )
Test if 2 scenario match.
Test if 2 scenario match.
Parameters
- $scenario1
- scenario name
- $scenario2
- scenario name
Returns
boolean TRUE if both scenario names match, FALSE otherwise
|
Constants summary
string |
ANY_STATUS
|
|
string |
ANY_WORKFLOW
|
|