File tree 1 file changed +8
-0
lines changed 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -663,6 +663,9 @@ of domain logic in your templates:
663
663
664
664
``workflow_has_marked_place() ``
665
665
Returns ``true `` if the marking of the given object has the given state.
666
+
667
+ ``workflow_transition_blockers() ``
668
+ Returns :class: `Symfony\\ Component\\ Workflow\\ TransitionBlockerList ` for the given transition.
666
669
667
670
The following example shows these functions in action:
668
671
@@ -695,6 +698,11 @@ The following example shows these functions in action:
695
698
{% if 'reviewed' in workflow_marked_places(post) %}
696
699
<span class="label">Reviewed</span>
697
700
{% endif %}
701
+
702
+ {# Loop through the transition blockers #}
703
+ {% for blocker in workflow_transition_blockers(post, 'publish') %}
704
+ <span class="error">{{ blocker.message }}</span>
705
+ {% endfor %}
698
706
699
707
Storing Metadata
700
708
----------------
You can’t perform that action at this time.
0 commit comments