Creating a custom Bulk Action
In some cases, forcing the user to click a button for each item in a grid isn't practical. Fortunately, you can take advantage of built-in bulk actions. However, these may not always be sufficient and might need customization.
To do this, simply create your own bulk action template and register it inside the sylius_grid
.
In the template we will specify the button's icon to be export
and its colour to be orange
.
Now configure the new action's template:
From now on, you can use your new bulk action type in the grid configuration!
Let's assume that you already have a route for exporting by injecting ids. Now, you can configure the grid action:
Last updated