yii2-workflow Class Reference
  • Namespace
  • Class

Namespaces

  • raoul2000
    • workflow
      • actions
      • base
      • events
      • helpers
      • source
        • file
      • validation

Classes

  • BasicEventSequence
  • ExtendedEventSequence
  • ReducedEventSequence
  • WorkflowEvent

Interfaces

  • IEventSequence

Interface IEventSequence

Defines the interface that must be implemented by all Event sequence. An event sequence is an array of workflow events that occurs on three occasions :

  • 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 methods, the implementation must returns with 2 keys : before and after. For each key, the value is an array of \raoul2000\workflow\events\WorkflowEvent representing the sequence of event to fire before or after the workflow event occurs.

Two event sequences implementations are provided :

  • raoul2000\workflow\events\BasicEventSequence
  • raoul2000\workflow\events\ExtendedEventSequence

Direct known implementers

raoul2000\workflow\events\BasicEventSequence, raoul2000\workflow\events\ExtendedEventSequence, raoul2000\workflow\events\ReducedEventSequence

Namespace: raoul2000\workflow\events
Located at events/IEventSequence.php

Methods summary

public array
# createEnterWorkflowSequence( raoul2000\workflow\base\StatusInterface $initalStatus, Object $sender )

Creates and returns the sequence of events that occurs when a model enters into a workflow.

Creates and returns the sequence of events that occurs when a model enters into a workflow.

Parameters

$initalStatus
the status used to enter into the workflow (the initial status)
$sender

Returns

array
public array
# createLeaveWorkflowSequence( raoul2000\workflow\base\StatusInterface $finalStatus, Object $sender )

Creates and returns the sequence of events that occurs when a model leaves a workflow.

Creates and returns the sequence of events that occurs when a model leaves a workflow.

Parameters

$finalStatus

the status that the model last visited in the workflow it is leaving (the final status)

$sender

Returns

array
public array
# createChangeStatusSequence( raoul2000\workflow\base\TransitionInterface $transition, Object $sender )

Creates and returns the sequence of events that occurs when a model changes from an existing status to another existing status.

Creates and returns the sequence of events that occurs when a model changes from an existing status to another existing status.

Parameters

$transition

the transition representing the status change

$sender

Returns

array
yii2-workflow Class Reference API documentation generated by ApiGen