You are here

function forward_entity_delete in Forward 7.3

Implements hook_entity_delete().

File

./forward.module, line 565
Allows forwarding of entities by email, and provides a record of how often each has been forwarded.

Code

function forward_entity_delete($entity, $entity_type) {
  $info = entity_get_info($entity_type);
  if (!empty($info['view modes'])) {
    list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
    db_delete('forward_statistics')
      ->condition('type', $entity_type)
      ->condition('bundle', $bundle)
      ->condition('id', $id)
      ->execute();
  }
}