2 * Implements hook_entity_delete().
4 function {{ machine_name }}_entity_delete($entity, $type) {
5 // Delete the entity's entry from a fictional table of all entities.
6 $info = entity_get_info($type);
7 list($id) = entity_extract_ids($type, $entity);
8 db_delete('example_entity')
9 ->condition('type', $type)
10 ->condition('id', $id)