8000 minor #7820 Added docs for workflow_marked_places() function (javiere… · symfony/symfony-docs@72bd8ed · GitHub
[go: up one dir, main page]

Skip to content

Commit 72bd8ed

Browse files
committed
minor #7820 Added docs for workflow_marked_places() function (javiereguiluz)
This PR was submitted for the master branch but it was merged into the 3.2 branch instead (closes #7820). Discussion ---------- Added docs for workflow_marked_places() function This fixes #7785. Commits ------- f9ac72d Added docs for workflow_marked_places() function
2 parents b9ef3c0 + f9ac72d commit 72bd8ed

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

workflow/usage.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,16 @@ This class has two more methods:
249249
Usage in Twig
250250
-------------
251251

252-
Using your workflow in your Twig templates reduces the need of domain logic
253-
in the view layer. Consider this example of the control panel of the blog.
254-
The links below will only be displayed when the action is allowed:
252+
Symfony defines several Twig functions to manage workflows and reduce the need
253+
of domain logic in your templates:
254+
255+
``workflow_can()``
256+
Returns ``true`` if the given object can make the given transition.
257+
258+
``workflow_transitions()``
259+
Returns an array with all the transitions enabled for the given object.
260+
261+
The following example shows these functions in action:
255262

256263
.. code-block:: twig
257264

0 commit comments

Comments
 (0)
0