function EntityOperations::entityRevisionDelete
Implements hook_entity_revision_delete().
Attributes
#[Hook('entity_revision_delete')]
File
-
core/
modules/ workspaces/ src/ Hook/ EntityOperations.php, line 147
Class
- EntityOperations
- Defines a class for reacting to entity runtime hooks.
Namespace
Drupal\workspaces\HookCode
public function entityRevisionDelete(EntityInterface $entity) : void {
if (!$this->workspaceInfo
->isEntityTypeSupported($entity->getEntityType())) {
return;
}
$this->workspaceAssociation
->deleteAssociations(NULL, $entity->getEntityTypeId(), [
$entity->id(),
], [
$entity->getRevisionId(),
]);
$this->workspaceManager
->getActiveWorkspace()?->getProvider()
->entityRevisionDelete($entity);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.