Skip to content

Commit 2da3788

Browse files
committed
minor #15126 [Workflow] Update workflow.rst (noniagriconomie)
This PR was merged into the 4.4 branch. Discussion ---------- [Workflow] Update workflow.rst Fixes #14637 I do not know if I should also write in the code exemple, feel free to comment related to ⬇️ ```php // this injects the blog_publishing "workflow" configured before // if blog_publishing is of type "state_machine", consider // injecting WorkflowInterface $blogPublishingStateMachine public function __construct(WorkflowInterface $blogPublishingWorkflow) { $this->blogPublishingWorkflow = $blogPublishingWorkflow; } ``` Commits ------- 07dea78 Update workflow.rst
2 parents 127ac0e + 07dea78 commit 2da3788

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

workflow.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ Accessing the Workflow in a Class
238238

239239
You can use the workflow inside a class by using
240240
:doc:`service autowiring </service_container/autowiring>` and using
241-
``camelCased workflow name + Workflow`` as parameter name::
241+
``camelCased workflow name + Workflow`` as parameter name. If it is a state machine type
242+
you can use ``camelCased workflow name + StateMachine``::
242243

243244
use App\Entity\BlogPost;
244245
use Symfony\Component\Workflow\WorkflowInterface;

0 commit comments

Comments
 (0)