You are here

public function HeartbeatFlagPlugin::activityRemoved in Heartbeat 7

activityRemoved()

Overrides HeartbeatBasePlugin::activityRemoved

File

modules/heartbeat_plugins/includes/heartbeatflagplugin.inc, line 96
Heartbeat Flag Base Plugin and some required utility functions.

Class

HeartbeatFlagPlugin
HeartbeatFlagPlugin abstract class.

Code

public function activityRemoved($uaids, $all) {
  foreach (array(
    'flag_content',
    'flag_counts',
  ) as $table) {
    $query = db_delete($table);
    $query
      ->condition('content_type', 'heartbeat_activity');
    if (!empty($uaids) && $all == FALSE) {
      $query
        ->condition('content_id', $uaids, 'IN');
    }
    $query
      ->execute();
  }
}