Skip to content

Commit 3cede82

Browse files
committed
minor #22200 [Workflow] Document name argument for twig functions (MrYamous)
This PR was merged into the 6.4 branch. Discussion ---------- [Workflow] Document name argument for twig functions Inspired by #22199, the `name` argument for workflow twig functions is not documented Commits ------- 59a16ad [Workflow] Document name argument for twig functions
2 parents 0312cc2 + 59a16ad commit 3cede82

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

workflow.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,12 +1097,14 @@ of domain logic in your templates:
10971097
``workflow_transition_blockers()``
10981098
Returns :class:`Symfony\\Component\\Workflow\\TransitionBlockerList` for the given transition.
10991099

1100-
The following example shows these functions in action:
1100+
All workflow functions accept an optional ``name`` argument (the workflow name)
1101+
as the last parameter. This is only required when the object is associated with
1102+
multiple workflows:
11011103

11021104
.. code-block:: html+twig
11031105

11041106
<h3>Actions on Blog Post</h3>
1105-
{% if workflow_can(post, 'publish') %}
1107+
{% if workflow_can(post, 'publish', 'blog_publishing') %}
11061108
<a href="...">Publish</a>
11071109
{% endif %}
11081110
{% if workflow_can(post, 'to_review') %}

0 commit comments

Comments
 (0)