function workspaces_entity_revision_delete

Same name and namespace in other branches
  1. 10 core/modules/workspaces/workspaces.module \workspaces_entity_revision_delete()

Implements hook_entity_revision_delete().

File

core/modules/workspaces/workspaces.module, line 191

Code

function workspaces_entity_revision_delete(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.