PHP Класс raoul2000\workflow\source\file\MinimalArrayParser

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'  => []
]
Наследование: extends WorkflowArrayParser
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
parse ( string $wId, array $definition, raoul2000\workflow\source\file\WorkflowFileSource $source ) : array Parse a workflow defined as a PHP Array.

Приватные методы

Метод Описание
normalizeStatusIds ( array $ids, string $workflowId, $source )

Описание методов

parse() публичный Метод

The workflow definition passed as argument is turned into an array that can be used by the WorkflowFileSource components.
public parse ( string $wId, array $definition, raoul2000\workflow\source\file\WorkflowFileSource $source ) : array
$wId string
$definition array
$source raoul2000\workflow\source\file\WorkflowFileSource
Результат array The parse workflow array definition