[Workflow] add get available on workflow component#26042
Conversation
|
Hello @ronfroy Could you describe your use case for this feature? For now, I'm a bit reluctant to add this feature to Symfony. |
|
@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? |
|
@lyrixx Maybe we can just add a "validate" method to the workflow that call only a throw validation event. |
|
@lyrixx https://github.com/symfony/symfony/pull/26076/files this is maybe a better way to achieve this? |
|
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.