Skip to content

Commit f1d6ea4

Browse files
authored
[WORKFLOW] Fixed example usage of DefinitionBuilder
Hi, the first code example uses the `DefinitionBuilder` with the fluent interface and a finale `build()` call. `$definition` still is the builder and not the built defintion. Cheers Matthias
1 parent 302a3b4 commit f1d6ea4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/workflow.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ these statuses are called **places**. You can define the workflow like this::
4444
use Symfony\Component\Workflow\Workflow;
4545
use Symfony\Component\Workflow\MarkingStore\SingleStateMarkingStore;
4646

47-
$definition = new DefinitionBuilder();
48-
$definition->addPlaces(['draft', 'review', 'rejected', 'published'])
47+
$definitionBuilder = new DefinitionBuilder();
48+
$definition = $definitionBuilder->addPlaces(['draft', 'review', 'rejected', 'published'])
4949
// Transitions are defined with a unique name, an origin place and a destination place
5050
->addTransition(new Transition('to_review', 'draft', 'review'))
5151
->addTransition(new Transition('publish', 'review', 'published'))

0 commit comments

Comments
 (0)