You are here

function track_field_changes_entity_delete in Track Field Changes 8

Implements hook_entity_delete().

File

./track_field_changes.module, line 100

Code

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