- Issue created by @amateescu
-
amateescu →
committed c0001b91 on 3.x
Issue #3506131: Add the concept of trash handlers
-
amateescu →
committed c0001b91 on 3.x
Trash support requires various entity type-specific customizations, for example:
- altering search_node_search
queries for nodes
- handling the deletion of menu link definitions for custom menu links
- handling the deletion of descendants for taxonomy terms
- etc.
Add the concept of per-entity type trash handlers.
A few options were considered for this implementation:
Entity handlers:
- these were the obvious fit at first sight, but had a deal breaker: we need trash handlers to implement non-entity-specific hooks (hook_query_alter()
for example), and entity handlers can't do that
Plugins:
- same problem as entity handlers, plus the overhead of a plugin manager and the fact that they won't be exposed anywhere in the UI
Tagged services:
- they can implement hooks if placed in a specific location (at least until
✨
Support hooks (Hook attribute) in components
Active
)
- minimal overhead
- add two new methods on TrashHandlerInterface
and a default implementation for the messaging displayed on entity delete and restore forms.
Nope.
New API for trash handlers based on tagged services.
Nope.
Active
3.0
Code
Issue #3506131: Add the concept of trash handlers