Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf716e81

Browse files
committed
Incorporate@OskarStark's feedback
1 parent94d17de commitf716e81

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

‎workflow/usage.rst‎

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -621,34 +621,34 @@ requires:
621621
622622
// config/packages/workflow.php
623623
624-
$container->loadFromExtension('framework', [
625-
// ...
626-
'workflows' => [
627-
'blog_publishing' => [
628-
'metadata' => [
629-
'title' => 'Blog Publishing Workflow',
630-
],
624+
$container->loadFromExtension('framework', [
631625
// ...
632-
'places' => [
633-
'draft' => [
626+
'workflows' => [
627+
'blog_publishing' => [
634628
'metadata' => [
635-
'max_num_of_words' =>500,
629+
'title' =>'Blog Publishing Workflow',
636630
],
637-
],
638-
// ...
639-
],
640-
'transitions' => [
641-
'to_review' => [
642-
'from' => 'draft',
643-
'to' => 'review',
644-
'metadata' => [
645-
'priority' => 0.5,
631+
// ...
632+
'places' => [
633+
'draft' => [
634+
'metadata' => [
635+
'max_num_of_words' => 500,
636+
],
637+
],
638+
// ...
639+
],
640+
'transitions' => [
641+
'to_review' => [
642+
'from' => 'draft',
643+
'to' => 'review',
644+
'metadata' => [
645+
'priority' => 0.5,
646+
],
647+
],
646648
],
647649
],
648650
],
649-
],
650-
],
651-
]);
651+
]);
652652
653653
Then you can access this metadata in your controller as follows::
654654

@@ -694,12 +694,12 @@ Metadata can also be accessed in a Listener, from the Event object.
694694
Using transition blockers you can
695695
return a user-friendly error message when you stop a transition from happening. In the example we
696696
get this message from the:class:`Symfony\\Component\\Workflow\\Event\\Event`'s metadata, giving
697-
youan easy place to manage the text.
697+
youa central place to manage the text.
698698

699699
..tip::
700700

701-
This is a simple example; in production you may prefer to use the:doc:`Translation</components/translation>`
702-
component to manage messages in one place::
701+
This is a simple example; in production you may prefer to use the:doc:`Translation</components/translation>`
702+
component to manage messages in one place::
703703

704704
namespace App\Listener\Workflow\Task;
705705

@@ -731,7 +731,7 @@ component to manage messages in one place::
731731

732732
..versionadded::4.1
733733

734-
The transition blockers wereadded in version 4.1.
734+
The transition blockers wereintroduced in version 4.1.
735735

736736
In Twig templates, metadata is available via the ``workflow_metadata()`` function:
737737

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp