Skip to content

Commit 9c14995

Browse files
authored
Update workflow.rst
Corrected attempt at method call via constructor;
1 parent 53c1e20 commit 9c14995

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-
->addPlaces(['draft', 'review', 'rejected', 'published'])
47+
$definition = new DefinitionBuilder();
48+
$definition->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)