You are here

function oa_notifications_delete_for_target in Open Atrium Notifications 7.2

Delete notifications for a target.

Parameters

int $id: The target id (e.g. node id).

string $type: The target type (e.g. 'group', 'team').

2 calls to oa_notifications_delete_for_target()
oa_notifications_node_delete in ./oa_notifications.module
Implements hook_node_delete().
oa_notification_parse in ./oa_notifications.module
Helper function to parse notifications from the input field value

File

./oa_notifications.module, line 489

Code

function oa_notifications_delete_for_target($id, $type) {
  db_delete('oa_notifications')
    ->condition('target_id', $id)
    ->condition('target_type', $type)
    ->execute();
}