You are here

function entity_embed_entity_delete in Entity Embed 7.2

Same name and namespace in other branches
  1. 7 includes/entity_embed.file_usage.inc \entity_embed_entity_delete()

Implements hook_entity_delete().

File

includes/entity_embed.file_usage.inc, line 40
Tracks usage of embedded files.

Code

function entity_embed_entity_delete($entity, $type) {
  list($id, $vid, $bundle) = entity_extract_ids($type, $entity);
  db_delete('file_usage')
    ->condition('module', 'entity_embed')
    ->condition('type', $type)
    ->condition('id', $id)
    ->execute();
}