File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -249,9 +249,16 @@ This class has two more methods:
249
249
Usage in Twig
250
250
-------------
251
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:
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:
255
262
256
263
.. code-block :: twig
257
264
You can’t perform that action at this time.
0 commit comments