File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 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:
663663
664664``workflow_has_marked_place() ``
665665 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.
666669
667670The following example shows these functions in action:
668671
@@ -695,6 +698,11 @@ The following example shows these functions in action:
695698 {% if 'reviewed' in workflow_marked_places(post) %}
696699 <span class="label">Reviewed</span>
697700 {% 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 %}
698706
699707Storing Metadata
700708----------------
You can’t perform that action at this time.
0 commit comments