PHP Interface raoul2000\workflow\events\IEventSequence
An
event sequence is an array of workflow events that occur on three circumstances
for which a method is called :
- createEnterWorkflowSequence : when a model enters into a workflow
- createChangeStatusSequence : when a model status change from a non empty status to another one
- createLeaveWorkflowSequence : when a model leaves a workflow
For each one of these method, the implementation must returns an array of Workflow events that extend
\raoul2000\workflow\events\WorkflowEvent.
Two event sequence implementations are provided : {@link \raoul2000\workflow\events\BasicEventSequence} and
{@link \raoul2000\workflow\events\ExtendedEventSequence}
Exibir arquivo
Open project: raoul2000/yii2-workflow
Public Methods
Method |
Description |
|
createChangeStatusSequence ( raoul2000\workflow\base\TransitionInterface $transition, Object $sender ) : array |
Creates and returns the sequence of events that occurs when a model changes
from an existing status to another existing status. |
|
createEnterWorkflowSequence ( raoul2000\workflow\base\StatusInterface $initalStatus, Object $sender ) : array |
Creates and returns the sequence of events that occurs when a model enters into a workflow. |
|
createLeaveWorkflowSequence ( raoul2000\workflow\base\StatusInterface $finalStatus, Object $sender ) : array |
Creates and returns the sequence of events that occurs when a model leaves a workflow. |
|
Method Details
createChangeStatusSequence()
public method
Creates and returns the sequence of events that occurs when a model changes
from an existing status to another existing status.
public createChangeStatusSequence ( raoul2000\workflow\base\TransitionInterface $transition, Object $sender ) : array |
$transition |
raoul2000\workflow\base\TransitionInterface |
the transition representing the status
change |
$sender |
Object |
|
return |
array |
|
createEnterWorkflowSequence()
public method
Creates and returns the sequence of events that occurs when a model enters into a workflow.
public createEnterWorkflowSequence ( raoul2000\workflow\base\StatusInterface $initalStatus, Object $sender ) : array |
$initalStatus |
raoul2000\workflow\base\StatusInterface |
the status used to enter into the workflow (the initial status) |
$sender |
Object |
|
return |
array |
|
createLeaveWorkflowSequence()
public method
Creates and returns the sequence of events that occurs when a model leaves a workflow.
public createLeaveWorkflowSequence ( raoul2000\workflow\base\StatusInterface $finalStatus, Object $sender ) : array |
$finalStatus |
raoul2000\workflow\base\StatusInterface |
the status that the model last visited in the workflow it is leaving
(the final status) |
$sender |
Object |
|
return |
array |
|