Class MinimalArrayParser
Parse a workflow definition provided as a minimal PHP array.
Following rules apply :
- the array must be associative, each key being a status Id, and each value is an array of target status id.
- no 'initialStatusId' is required : the first status defined is considered as the initial status
- no additional attribute is supported : label, metadata, transition
For example :
[ 'draft' => ['ready', 'delivered'], 'ready' => ['draft', 'delivered'], 'delivered' => ['payed', 'archived'], 'payed' => ['archived'], 'archived' => [] ]
You can also use a comma separated list of status for the end status list instead of an array. For example :
[ 'draft' => 'ready, delivered', 'ready' => 'draft, delivered', 'delivered' => 'payed, archived', 'payed' => 'archived', 'archived' => [] ]
- yii\base\Object
- raoul2000\workflow\source\file\WorkflowArrayParser
- raoul2000\workflow\source\file\MinimalArrayParser
Methods summary
public
array
|
#
parse( string $wId, array $definition,
Parse a workflow defined as a PHP Array. |