You are here

function editor_note_entity_delete in Editor Notes 7

Same name and namespace in other branches
  1. 8 editor_note.module \editor_note_entity_delete()

Implements hook_entity_delete().

File

./editor_note.module, line 283
Main functionality for Editor Notes module.

Code

function editor_note_entity_delete($entity, $type) {
  list($entity_id) = entity_extract_ids($type, $entity);

  // Removes notes from editor notes table.
  db_delete('editor_note')
    ->condition('entity_type', $type)
    ->condition('entity_id', $entity_id)
    ->execute();
}