File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,10 @@ you can get the workflow by injecting the Workflow registry service::
194194 // pass the workflow name as the second argument
195195 // $workflow = $workflows->get($post, 'blog_publishing');
196196
197+ // you can also get all workflows associated with an object, which is useful
198+ // for example to show the status of all those workflows in a backend
199+ $postWorkflows = $workflows->all($post);
200+
197201 $workflow->can($post, 'publish'); // False
198202 $workflow->can($post, 'to_review'); // True
199203
@@ -213,6 +217,10 @@ you can get the workflow by injecting the Workflow registry service::
213217 The :class: `Symfony\\ Component\\ Workflow\\ Exception\\ TransitionException `
214218 class was introduced in Symfony 4.1.
215219
220+ .. versionadded :: 4.1
221+ The :method: `Symfony\\ Component\\ Workflow\\ Registry::all ` method was
222+ introduced in Symfony 4.1.
223+
216224Using Events
217225------------
218226
You can’t perform that action at this time.
0 commit comments