File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -472,13 +472,11 @@ Transition Blockers
472
472
-------------------
473
473
474
474
.. versionadded :: 4.1
475
- Transition Blockers were introduced in Symfony 4.1.
476
-
477
- Transition Blockers provide a simple way to return a human-readable message for why a transition
478
- was blocked. You can access the message from Twig. Here's an example:
479
475
476
+ Transition Blockers were introduced in Symfony 4.1.
480
477
481
- .. code-block :: php
478
+ Transition Blockers provide a way to return a human-readable message for why a
479
+ transition was blocked::
482
480
483
481
use Symfony\Component\Workflow\Event\GuardEvent;
484
482
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@@ -508,6 +506,8 @@ was blocked. You can access the message from Twig. Here's an example:
508
506
}
509
507
}
510
508
509
+ You can access the message from a Twig template as follows:
510
+
511
511
.. code-block :: html+twig
512
512
513
513
<h2>Publication was blocked because:</h2>
You can’t perform that action at this time.
0 commit comments