2 * Implements hook_ENTITY_TYPE_delete().
4 function {{ machine_name }}_ENTITY_TYPE_delete(Drupal\Core\Entity\EntityInterface $entity) {
5 // Delete the entity's entry from a fictional table of all entities.
6 db_delete('example_entity')
7 ->condition('type', $entity->getEntityTypeId())
8 ->condition('id', $entity->id())