8000 [Workflow] Add `getEnabledTransition()` method by ChibyJade · Pull Request #19243 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Workflow] Add getEnabledTransition() method #19243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 9, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add getEnabledTransition() method
  • Loading branch information
ChibyJade authored Dec 9, 2023
commit 1601f09e61fb7b216eab6f09c43c7bb59841e62b
9 changes: 9 additions & 0 deletions workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,15 @@ machine type, use ``camelCased workflow name + StateMachine``::
}
}

To get all enabled transitions of a Workflow, you can use
:method:`Symfony\\Component\\Workflow\\WorkflowInterface::getEnabledTransitions`
method.

.. versionadded:: 7.1

The :method:`Symfony\\Component\\Workflow\\WorkflowInterface::getEnabledTransitions` method
was introduced in Symfony 7.1.

Workflows can also be injected thanks to their name and the
:class:`Symfony\\Component\\DependencyInjection\\Attribute\\Target`
attribute::
Expand Down
0