Skip to content

Commit 0d3cf69

Browse files
committed
[#12545] Slightly improved the title
1 parent 0926556 commit 0d3cf69

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

workflow.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,11 @@ what actions are allowed on a blog post::
216216
// See all the available transitions for the post in the current state
217217
$transitions = $workflow->getEnabledTransitions($post);
218218
219-
In a class or a controller
220-
--------------------------
219+
Accessing the Workflow in a Class
220+
---------------------------------
221221

222-
To access workflow inside a class, use dependency injection and inject the registry in the constructor.
223-
224-
For a controller, you can directly inject it in a method::
222+
To access workflow inside a class, use dependency injection and inject the
223+
registry in the constructor::
225224

226225
use Symfony\Component\Workflow\Registry;
227226

0 commit comments

Comments
 (0)