You can manage workflows with PHP API by using
Workflow uses the Symfony Workflow Component, extended in the workflow service.
The service implements the following methods:
start- places a Content item in a workflow
apply- performs a transition
can- checks if a transition is possible
can are the same as in Symfony Workflow,
but the implementation in workflow service extends them, for example by providing messages.
Getting workflow information¶
To get information about a specific workflow for a Content item, use
1 2 3 4
marking, a term from Symfony Workflow,
refers to a state in a workflow.
To get a list of all workflows that can be used for a given Content item, use
Applying workflow transitions¶
To place a Content item in a workflow, use
To apply a transition to a Content item, use
Additionally, you can check if the transition is possible for the given object using
1 2 3 4
Ibexa\Workflow\Value\WorkflowMetadata object contains all
information about a workflow, such as ID, name, transitions and current stage.
Ibexa\Workflow\Value\WorkflowMetadata::$workflow gives you direct
access to native Symfony Workflow object.