You are here

function Notifications_Subscription::event_conditions in Notifications 7

Get event conditions OR'd

These will look like

s.type = 'node' AND (field_condition1 OR field_condition2) s.type = 'term' AND (field_condition1)

File

./notifications.subscription.inc, line 728
Drupal Notifications Framework - Default class file

Class

Notifications_Subscription
Common base for subscription type and subscription instance

Code

function event_conditions($event) {
  $condition = $this
    ->object_conditions($event
    ->get_objects());
  if ($condition && $condition
    ->count()) {

    // Finally, add subscription type
    return db_and()
      ->condition('s.type', $this->type)
      ->condition($condition);
  }
}