- Issue created by @tstoeckler
- Merge request !33Issue #3457501 by tstoeckler: Add the notion of default actions for the bulk form → (Open) created by tstoeckler
- Status changed to Needs review
6 months ago 7:38am 27 June 2024
In
#3018218: Add a list builder with support for bulk operations →
BulkFormEntityListBuilder
was introduced which - to be consistent with core - relies on action config entities to exist for the particular entity type in order for the bulk operations to show. Note that the action plugins are perfectly capable of actually performing the respective action, the config entities are really just a wrapper for the plugins. And since - at least in core - there are only four actions (delete, publish, save, unpublish) and none of them have any plugin configuration, requiring to create boilerplate config entities just to get the actions to show up is unfortunate and goes against the ideal of reducing boilerplate for custom entities.
Let's add the notion of "default actions" for BulkFormEntityListBuilder
: If no config actions can be found and the defaultActions
property is set, set up those default actions for the UI at runtime.
Alternatively we could also add a separate list builder that does that, with the common bulk form logic living in a common base class, but that means one more level in the class hierarchy for (in my opinion) little gain.
I also propose adding three default actions by default: publish, unpublish, delete (in that order). This is slightly opinionated, but
Lists using BulkFormEntityListBuilder
have actions by default even without any action config entities. If entity types want to avoid this behavior, they are just one(-ish) line of code away from disabling this.
-
-
Needs review
1.0
Entity CRUD admin UI