function WorkspacesHooks::entityRevisionDelete
Implements hook_entity_revision_delete().
File
-
core/
modules/ workspaces/ src/ Hook/ WorkspacesHooks.php, line 175
Class
- WorkspacesHooks
- Hook implementations for workspaces.
Namespace
Drupal\workspaces\HookCode
public function entityRevisionDelete(EntityInterface $entity) {
if (\Drupal::service('workspaces.information')->isEntityTypeSupported($entity->getEntityType())) {
\Drupal::service('workspaces.association')->deleteAssociations(NULL, $entity->getEntityTypeId(), [
$entity->id(),
], [
$entity->getRevisionId(),
]);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.