diff --git a/workflow.rst b/workflow.rst index 376996534ba..7521705980d 100644 --- a/workflow.rst +++ b/workflow.rst @@ -229,6 +229,8 @@ what actions are allowed on a blog post:: // See all the available transitions for the post in the current state $transitions = $workflow->getEnabledTransitions($post); + // See a specific available transition for the post in the current state + $transition = $workflow->getEnabledTransition($post, 'publish'); Accessing the Workflow in a Class --------------------------------- @@ -649,6 +651,9 @@ of domain logic in your templates: ``workflow_transitions()`` Returns an array with all the transitions enabled for the given object. +``workflow_transition()`` + Returns a specific transitions enabled for the given object and transition name. + ``workflow_marked_places()`` Returns an array with the place names of the given marking. @@ -883,6 +888,15 @@ In Twig templates, metadata is available via the ``workflow_metadata()`` functio {% endfor %}

+

+ to_review Priority +

+

Learn more ----------