File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -957,14 +957,14 @@ Then you can access this metadata in your controller as follows::
957957
958958There is a ``getMetadata() `` method that works with all kinds of metadata::
959959
960- // pass no arguments to getMetadata() to get "workflow metadata"
961- $title = $workflow->getMetadataStore()->getMetadata()[ 'title'] ;
960+ // get "workflow metadata" passing the metadata key as argument
961+ $title = $workflow->getMetadataStore()->getMetadata('title') ;
962962
963- // pass a string ( the place name) to getMetadata() to get " place metadata"
964- $maxNumOfWords = $workflow->getMetadataStore()->getMetadata('draft')['max_num_of_words'] ;
963+ // get "place metadata" passing the metadata key as the first argument and the place name as the second argument
964+ $maxNumOfWords = $workflow->getMetadataStore()->getMetadata('max_num_of_words', 'draft') ;
965965
966- // pass a Transition object to getMetadata() to get "transition metadata"
967- $priority = $workflow->getMetadataStore()->getMetadata($aTransition)[ 'priority'] ;
966+ // get "transition metadata" passing the metadata key as the first argument and a Transition object as the second argument
967+ $priority = $workflow->getMetadataStore()->getMetadata('priority', $aTransition) ;
968968
969969In a :ref: `flash message <flash-messages >` in your controller::
970970
You can’t perform that action at this time.
0 commit comments