function entity_modified_entity_delete in Entity modified 7
Implements hook_entity_delete().
Delete our custom stored entity modified record when the entity is deleted.
File
- ./
entity_modified.module, line 13 - Hook implementations and frequently used functions for entity modified module.
Code
function entity_modified_entity_delete($entity, $type) {
// Attempt to delete any record we stored for the entity. We do not check
// if it has a modified property because our knowledge of the property could
// have occurred after we already had a record (module updates).
list($entity_id) = entity_extract_ids($type, $entity);
db_delete('entity_modified')
->condition('entity_type', $type)
->condition('entity_id', $entity_id)
->execute();
}