Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2da3788

Browse filesBrowse 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
Copy full SHA for 2da3788

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Collapse file

‎workflow.rst‎

Copy file name to clipboardExpand all lines: workflow.rst
+2-1Lines changed: 2 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.