[GridBuilder] Apply transition action #305
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An helper for this kind of feature:
https://github.com/Sylius/Sylius/blob/1.13/src/Sylius/Bundle/AdminBundle/Resources/config/grids/product_review.yml#L56
I choose not to add "graph" on the action constructor and let the developer add it on the "options" side.
The reason is that is it's not mandatory and Symfony workflow & Winzou state machine have 2 default values (
default
for Winzou andnull
for Symfony workflow).The current template which is a Winzou specific one.
I do not remember if I've changed sth on that template on my Workflow PoC.
I do not like the way "setOptions" has been done (https://github.com/Sylius/SyliusGridBundle/blob/1.13/src/Bundle/Builder/Action/Action.php#L69). I think it's very confusing that it removes the existing values.
I think we should merge the Options for a future version and add a removeOption method instead to remove a specific option.