Loading taxonomy_entity_index.module +7 −4 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ */ use Drupal\Core\Cache\Cache; use Drupal\Core\Entity\ContentEntityInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\field\Entity\FieldConfig; use Drupal\taxonomy\TermInterface; Loading @@ -25,11 +26,13 @@ function taxonomy_entity_index_field_config_delete(FieldConfig $instance) { * Implements hook_entity_delete(). */ function taxonomy_entity_index_entity_delete(EntityInterface $entity) { if ($entity instanceOf ContentEntityInterface) { \Drupal::database()->delete('taxonomy_entity_index') ->condition('entity_type', $entity->getEntityTypeId()) ->condition('entity_id', $entity->id()) ->execute(); } } /** * Implements hook_ENTITY_TYPE_delete(). Loading Loading
taxonomy_entity_index.module +7 −4 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ */ use Drupal\Core\Cache\Cache; use Drupal\Core\Entity\ContentEntityInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\field\Entity\FieldConfig; use Drupal\taxonomy\TermInterface; Loading @@ -25,11 +26,13 @@ function taxonomy_entity_index_field_config_delete(FieldConfig $instance) { * Implements hook_entity_delete(). */ function taxonomy_entity_index_entity_delete(EntityInterface $entity) { if ($entity instanceOf ContentEntityInterface) { \Drupal::database()->delete('taxonomy_entity_index') ->condition('entity_type', $entity->getEntityTypeId()) ->condition('entity_id', $entity->id()) ->execute(); } } /** * Implements hook_ENTITY_TYPE_delete(). Loading