You are here

function taxonomy_entity_index_entity_revision_delete in Taxonomy Entity Index 8

Implements hook_entity_revision_delete().

File

./taxonomy_entity_index.module, line 46
Module file for taxonomy_entity_index.

Code

function taxonomy_entity_index_entity_revision_delete(EntityInterface $entity) {
  \Drupal::database()
    ->delete('taxonomy_entity_index')
    ->condition('entity_type', $entity
    ->getEntityTypeId())
    ->condition('entity_id', $entity
    ->id())
    ->condition('revision_id', $entity
    ->getRevisionId())
    ->execute();
}