You are here

function taxonomy_entity_index_entity_delete in Taxonomy Entity Index 8

Same name and namespace in other branches
  1. 7 taxonomy_entity_index.module \taxonomy_entity_index_entity_delete()

Implements hook_entity_delete().

File

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

Code

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