yii2-workflow Class Reference
  • Namespace
  • Class

Namespaces

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

Classes

  • DefaultArrayParser
  • GraphmlLoader
  • MinimalArrayParser
  • PhpArrayLoader
  • PhpClassLoader
  • WorkflowArrayParser
  • WorkflowDefinitionLoader
  • WorkflowFileSource

Interfaces

  • IWorkflowDefinitionProvider

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
Extended by raoul2000\workflow\source\file\WorkflowArrayParser
Extended by raoul2000\workflow\source\file\MinimalArrayParser
Namespace: raoul2000\workflow\source\file
Located at source/file/MinimalArrayParser.php

Methods summary

public array
# parse( string $wId, array $definition, raoul2000\workflow\source\file\WorkflowFileSource $source )

Parse a workflow defined as a PHP Array.

Parse a workflow defined as a PHP Array.

The workflow definition passed as argument is turned into an array that can be used by the WorkflowFileSource components.

Parameters

$wId
$definition
$source

Returns

array
The parse workflow array definition

Throws

raoul2000\workflow\base\WorkflowValidationException

Methods inherited from raoul2000\workflow\source\file\WorkflowArrayParser

validate()

Properties summary

Properties inherited from raoul2000\workflow\source\file\WorkflowArrayParser

$validate

yii2-workflow Class Reference API documentation generated by ApiGen