10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9ef3c0 commit f9ac72dCopy full SHA for f9ac72d
workflow/usage.rst
@@ -249,9 +249,16 @@ This class has two more methods:
249
Usage in Twig
250
-------------
251
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:
+Symfony defines several Twig functions to manage workflows and reduce the need
+of domain logic in your templates:
+
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:
262
263
.. code-block:: twig
264
0 commit comments