Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Workflow] add get available on workflow component#26042
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[Workflow] add get available on workflow component#26042
Uh oh!
There was an error while loading.Please reload this page.
Conversation
lyrixx commentedFeb 7, 2018
Hello@ronfroy Could you describe your use case for this feature? For now, I'm a bit reluctant to add this feature to Symfony. |
ronfroy commentedFeb 7, 2018
@lyrixx I want to validate a transition with multiple error depending of rich condition (sub entity, author...) after an user action. In my idea i get all available transition and call "->can" to generate error with guard listener. Maybe you have a better solution? |
ronfroy commentedFeb 7, 2018
@lyrixx Maybe we can just add a "validate" method to the workflow that call only a throw validation event. |
ronfroy commentedFeb 7, 2018
@lyrixxhttps://github.com/symfony/symfony/pull/26076/files this is maybe a better way to achieve this? |
lyrixx commentedFeb 7, 2018
With#26076 you will be able to know why a transition is blocked. I think it's the way to go indeed. I'm closing this PR, but don't hesitate to re-open it if something is missing. |
Returns all available transitions (without taking care of guard handlers). It's may be really useful in the case we have to get the available and not juste enabled.