Note: This issue is part of
#2721129: Workflow Initiative →
and is only meant for planning and governance sign-offs. Work will happen in child issues of this plan.
Some historic background:
#147723: Deletion API for core →
and http://drupal4hu.com/node/233
This phase will introduce two new methods in the content entity storage: softDelete()
and forceDelete()
. This is primarily important for replication and conflict management (see
phase H →
) but also enables things like Trash module (see
phase E →
).
The softDelete() method is the logical replacement of the traditional delete method. But instead of erasing the entity from the database, it will save a new revision with a timestamp base field called "deleted_at" set to the current request time. The entity query and storage API will add conditions on this base field where necessary. This method will also invoke a new hook called hook_entity_softdelete()
.
The forceDelete() method will erase an entity from the database and invoke hook_entity_forcedelete()
. The forceDelete()
method will also invoke the deprecated hook_entity_delete()
for backward compatibility reasons, as the traditional behaviour of this hook is to erase things from the database.
The softDelete()
and forceDelete()
methods also have more explicit names to what they actually do, while delete()
is more ambiguous.
Sign-offs needed
Product manager
A product manager needs to sign-off on this plan as the above phases are required as part of a planned initiative.
Framework manager
A framework manager needs to sign-off on this plan as the above phases introduces major API additions (archive and purge).
Sub-system maintainers
The sub-system maintainers for the Entity API needs to sign-off on this plan as it significantly impacts the Entity API.
Sign-offs given
- Product manager - pending
- Framework manager - pending
- Sub-system maintainers - pending