@@ -537,34 +537,34 @@ requires:
537537
538538 // config/packages/workflow.php
539539
540- $container->loadFromExtension('framework', [
541- // ...
542- 'workflows' => [
543- 'blog_publishing' => [
544- 'metadata' => [
545- 'title' => 'Blog Publishing Workflow',
546- ],
540+ $container->loadFromExtension('framework', [
547541 // ...
548- 'places ' => [
549- 'draft ' => [
542+ 'workflows ' => [
543+ 'blog_publishing ' => [
550544 'metadata' => [
551- 'max_num_of_words ' => 500 ,
545+ 'title ' => 'Blog Publishing Workflow' ,
552546 ],
553- ],
554- // ...
555- ],
556- 'transitions' => [
557- 'to_review' => [
558- 'from' => 'draft',
559- 'to' => 'review',
560- 'metadata' => [
561- 'priority' => 0.5,
547+ // ...
548+ 'places' => [
549+ 'draft' => [
550+ 'metadata' => [
551+ 'max_num_of_words' => 500,
552+ ],
553+ ],
554+ // ...
555+ ],
556+ 'transitions' => [
557+ 'to_review' => [
558+ 'from' => 'draft',
559+ 'to' => 'review',
560+ 'metadata' => [
561+ 'priority' => 0.5,
562+ ],
563+ ],
562564 ],
563565 ],
564566 ],
565- ],
566- ],
567- ]);
567+ ]);
568568
569569 Then you can access this metadata in your controller as follows::
570570
@@ -610,12 +610,12 @@ Metadata can also be accessed in a Listener, from the Event object.
610610Using transition blockers you can
611611return a user-friendly error message when you stop a transition from happening. In the example we
612612get this message from the :class: `Symfony\\ Component\\ Workflow\\ Event\\ Event `'s metadata, giving
613- you an easy place to manage the text.
613+ you a central place to manage the text.
614614
615615.. tip ::
616616
617- This is a simple example; in production you may prefer to use the :doc: `Translation </components/translation >`
618- component to manage messages in one place::
617+ This is a simple example; in production you may prefer to use the :doc: `Translation </components/translation >`
618+ component to manage messages in one place::
619619
620620 namespace App\L istener\W orkflow\T ask;
621621
@@ -647,7 +647,7 @@ component to manage messages in one place::
647647
648648.. versionadded :: 4.1
649649
650- The transition blockers were added in version 4.1.
650+ The transition blockers were introduced in version 4.1.
651651
652652In Twig templates, metadata is available via the ``workflow_metadata() `` function:
653653
0 commit comments