@@ -665,7 +665,7 @@ of domain logic in your templates:
665665
666666``workflow_has_marked_place() ``
667667 Returns ``true `` if the marking of the given object has the given state.
668-
668+
669669``workflow_transition_blockers() ``
670670 Returns :class: `Symfony\\ Component\\ Workflow\\ TransitionBlockerList ` for the given transition.
671671
@@ -700,7 +700,7 @@ The following example shows these functions in action:
700700 {% if 'reviewed' in workflow_marked_places(post) %}
701701 <span class="label">Reviewed</span>
702702 {% endif %}
703-
703+
704704 {# Loop through the transition blockers #}
705705 {% for blocker in workflow_transition_blockers(post, 'publish') %}
706706 <span class="error">{{ blocker.message }}</span>
@@ -856,14 +856,14 @@ Then you can access this metadata in your controller as follows::
856856
857857There is a ``getMetadata() `` method that works with all kinds of metadata::
858858
859- // pass no arguments to getMetadata() to get "workflow metadata"
860- $title = $workflow->getMetadataStore()->getMetadata()[ 'title'] ;
859+ // get "workflow metadata" passing the metadata key as argument
860+ $title = $workflow->getMetadataStore()->getMetadata('title') ;
861861
862- // pass a string ( the place name) to getMetadata() to get " place metadata"
863- $maxNumOfWords = $workflow->getMetadataStore()->getMetadata('draft')['max_num_of_words'] ;
862+ // get "place metadata" passing the metadata key as the first argument and the place name as the second argument
863+ $maxNumOfWords = $workflow->getMetadataStore()->getMetadata('max_num_of_words', 'draft') ;
864864
865- // pass a Transition object to getMetadata() to get "transition metadata"
866- $priority = $workflow->getMetadataStore()->getMetadata($aTransition)[ 'priority'] ;
865+ // get "transition metadata" passing the metadata key as the first argument and a Transition object as the second argument
866+ $priority = $workflow->getMetadataStore()->getMetadata('priority', $aTransition) ;
867867
868868In a :ref: `flash message <flash-messages >` in your controller::
869869
0 commit comments