@@ -499,12 +499,12 @@ requires:
499
499
.. code-block :: xml
500
500
501
501
<!-- config/packages/workflow.xml -->
502
- <?xml version =" 1.0" encoding =" utf -8" ?>
502
+ <?xml version =" 1.0" encoding =" UTF -8" ?>
503
503
<container xmlns =" http://symfony.com/schema/dic/services"
504
504
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
505
505
xmlns : framework =" http://symfony.com/schema/dic/symfony"
506
- xsi : schemaLocation =" http://symfony.com/schema/dic/services http ://symfony.com/schema/dic/services/services-1.0.xsd
507
- http://symfony.com/schema/dic/symfony http ://symfony.com/schema/dic/symfony/symfony-1.0.xsd"
506
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services https ://symfony.com/schema/dic/services/services-1.0.xsd
507
+ http://symfony.com/schema/dic/symfony https ://symfony.com/schema/dic/symfony/symfony-1.0.xsd"
508
508
>
509
509
510
510
<framework : config >
@@ -600,10 +600,11 @@ There is a shortcut that works with everything::
600
600
601
601
In a Flash message in your Controller::
602
602
603
- // $transition = ...; (an instance of Transition)
604
- // $workflow is a Workflow instance retrieved from the Registry (see above)
605
- $title = $workflow->getMetadataStore()->getMetadata('title', $transition);
606
- $this->addFlash('info', "You have successfully applied the transition with title: '$title'");
603
+ // $transition = ...; (an instance of Transition)
604
+
605
+ // $workflow is a Workflow instance retrieved from the Registry (see above)
606
+ $title = $workflow->getMetadataStore()->getMetadata('title', $transition);
607
+ $this->addFlash('info', "You have successfully applied the transition with title: '$title'");
607
608
608
609
Metadata can also be accessed in a Listener, from the Event object.
609
610
0 commit comments