Skip to content

Commit a6e8ad0

Browse files
committed
minor #8202 [Workflow] Fixed example usage of DefinitionBuilder (althaus)
This PR was merged into the 3.3 branch. Discussion ---------- [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 Commits ------- f1d6ea4 [WORKFLOW] Fixed example usage of DefinitionBuilder
2 parents 39503de + f1d6ea4 commit a6e8ad0

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)