diff --git a/components/workflow.rst b/components/workflow.rst index 8aa4d329d11..8d0863db76e 100644 --- a/components/workflow.rst +++ b/components/workflow.rst @@ -44,8 +44,8 @@ these statuses are called **places**. You can define the workflow like this:: use Symfony\Component\Workflow\Workflow; use Symfony\Component\Workflow\MarkingStore\SingleStateMarkingStore; - $definition = new DefinitionBuilder() - ->addPlaces(['draft', 'review', 'rejected', 'published']) + $definition = new DefinitionBuilder(); + $definition->addPlaces(['draft', 'review', 'rejected', 'published']) // Transitions are defined with a unique name, an origin place and a destination place ->addTransition(new Transition('to_review', 'draft', 'review')) ->addTransition(new Transition('publish', 'review', 'published'))