File tree Expand file tree Collapse file tree 1 file changed +9
-18
lines changed Expand file tree Collapse file tree 1 file changed +9
-18
lines changed Original file line number Diff line number Diff line change @@ -265,27 +265,18 @@ machine type, use ``camelCased workflow name + StateMachine``::
265
265
}
266
266
}
267
267
268
- Alternatively, use the registry::
268
+ .. versionadded :: 6.2
269
269
270
- use App\Entity\BlogPost;
271
- use Symfony\Component\Workflow\Registry;
272
-
273
- class MyClass
274
- {
275
- private $workflowRegistry;
276
-
277
- public function __construct(Registry $workflowRegistry)
278
- {
279
- $this->workflowRegistry = $workflowRegistry;
280
- }
270
+ All workflows and state machines are tagged since in Symfony 6.2.
281
271
282
- public function toReview(BlogPost $post)
283
- {
284
- $blogPublishingWorkflow = $this->workflowRegistry->get($post);
272
+ If you want to retrieve all workflows, for documentation purposes for example,
273
+ you can :doc: `inject all
274
+ services</service_container/service_subscribers_locators>` with the following
275
+ tag:
285
276
286
- // ...
287
- }
288
- }
277
+ * `` workflow ``: all workflows and all state machine;
278
+ * `` workflow.workflow ``: all workflows;
279
+ * `` workflow.state_machine ``: all state machines.
289
280
290
281
.. tip ::
291
282
You can’t perform that action at this time.
0 commit comments