You are here

function redhen_engagement_entity_delete in RedHen CRM 7

Implements hook_entity_delete().

Delete engagements associated with a source entity that has been deleted.

File

modules/redhen_engagement/redhen_engagement.module, line 450
RedhenEngagement hook implementations and API

Code

function redhen_engagement_entity_delete($entity, $type) {
  db_delete('redhen_engagement')
    ->condition('entity_type', $type)
    ->condition('entity_id', entity_id($type, $entity))
    ->execute();
}