File tree 1 file changed +6
-6
lines changed
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::
957
957
958
958
There is a ``getMetadata() `` method that works with all kinds of metadata::
959
959
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') ;
962
962
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') ;
965
965
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) ;
968
968
969
969
In a :ref: `flash message <flash-messages >` in your controller::
970
970
You can’t perform that action at this time.
0 commit comments