10000 Added docs for workflow_marked_places() function · symfony/symfony-docs@f9ac72d · GitHub
[go: up one dir, main page]

Skip to content

Commit f9ac72d

Browse files
javiereguiluzxabbuh
authored andcommitted
Added docs for workflow_marked_places() function
1 parent b9ef3c0 commit f9ac72d

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