From f1d6ea439cc8abaa3265f4bc744c51df32301cab Mon Sep 17 00:00:00 2001 From: Matthias Althaus Date: Thu, 20 Jul 2017 15:28:11 +0200 Subject: [PATCH] [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 --- components/workflow.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/workflow.rst b/components/workflow.rst index 8d0863db76e..f6af36e6d96 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(); - $definition->addPlaces(['draft', 'review', 'rejected', 'published']) + $definitionBuilder = new DefinitionBuilder(); + $definition = $definitionBuilder->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'))