File tree 1 file changed +8
-0
lines changed
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::
194
194
// pass the workflow name as the second argument
195
195
// $workflow = $workflows->get($post, 'blog_publishing');
196
196
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
+
197
201
$workflow->can($post, 'publish'); // False
198
202
$workflow->can($post, 'to_review'); // True
199
203
@@ -213,6 +217,10 @@ you can get the workflow by injecting the Workflow registry service::
213
217
The :class: `Symfony\\ Component\\ Workflow\\ Exception\\ TransitionException `
214
218
class was introduced in Symfony 4.1.
215
219
220
+ .. versionadded :: 4.1
221
+ The :method: `Symfony\\ Component\\ Workflow\\ Registry::all ` method was
222
+ introduced in Symfony 4.1.
223
+
216
224
Using Events
217
225
------------
218
226
You can’t perform that action at this time.
0 commit comments