PHP Interface raoul2000\workflow\source\IWorkflowSource

Afficher le fichier Open project: raoul2000/yii2-workflow

Méthodes publiques

Méthode Description
getAllStatuses ( string $id ) : raoul2000\workflow\base\StatusInterface[] Returns an array containing all Status instances belonging to the workflow whose id is passed as argument.
getStatus ( mixed $id, $model = null ) : raoul2000\workflow\base\StatusInterface Returns the Status instance for a given status id.
getTransition ( mixed $startId, mixed $endId, mixed $model = null ) : raoul2000\workflow\base\TransitionInterface Returns the transitions that leaves status $startId and reaches status $endId.
getTransitions ( mixed $statusId, $model = null ) : raoul2000\workflow\base\TransitionInterface[] Returns an array of transitions leaving the status whose id is passed as argument.
getWorkflow ( mixed $id ) : raoul2000\workflow\base\WorkflowInterface Returns the workflow instance whose id is passed as argument.

Method Details

getAllStatuses() public méthode

Returns an array containing all Status instances belonging to the workflow whose id is passed as argument.
public getAllStatuses ( string $id ) : raoul2000\workflow\base\StatusInterface[]
$id string workflow Id
Résultat raoul2000\workflow\base\StatusInterface[] list of status. The array key is the status ID

getStatus() public méthode

In case of unexpected error the implementation must return a WorkflowException.
public getStatus ( mixed $id, $model = null ) : raoul2000\workflow\base\StatusInterface
$id mixed the status id
Résultat raoul2000\workflow\base\StatusInterface the status instance or NULL if no status could be found for this id.

getTransition() public méthode

Returns the transitions that leaves status $startId and reaches status $endId.
public getTransition ( mixed $startId, mixed $endId, mixed $model = null ) : raoul2000\workflow\base\TransitionInterface
$startId mixed
$endId mixed
$model mixed @return \raoul2000\workflow\base\TransitionInterface the transition between start and end status
Résultat raoul2000\workflow\base\TransitionInterface

getTransitions() public méthode

If no status is found for this id, a WorkflowException must be thrown. If not outgoing transition exists for the status, an empty array must be returned. The array returned must be indexed by status Id
public getTransitions ( mixed $statusId, $model = null ) : raoul2000\workflow\base\TransitionInterface[]
$statusId mixed
Résultat raoul2000\workflow\base\TransitionInterface[] an array containing all out going transition from $statusId. If no such transition exist, this method returns an empty array.

getWorkflow() public méthode

In case of unexpected error the implementation must return a WorkflowException.
public getWorkflow ( mixed $id ) : raoul2000\workflow\base\WorkflowInterface
$id mixed the workflow id
Résultat raoul2000\workflow\base\WorkflowInterface the workflow instance or NULL if no workflow could be found.