Chris@0: /** Chris@0: * Implements hook_entity_delete(). Chris@0: */ Chris@0: function {{ machine_name }}_entity_delete($entity, $type) { Chris@0: // Delete the entity's entry from a fictional table of all entities. Chris@0: $info = entity_get_info($type); Chris@0: list($id) = entity_extract_ids($type, $entity); Chris@0: db_delete('example_entity') Chris@0: ->condition('type', $type) Chris@0: ->condition('id', $id) Chris@0: ->execute(); Chris@0: }