You are here

protected function Notifications_Event::subscriptions_conditions in Notifications 7

Get subscriptions conditions

1 call to Notifications_Event::subscriptions_conditions()
Notifications_Event::get_subscriptions in ./notifications.event.inc
Get subscriptions

File

./notifications.event.inc, line 420
Drupal Notifications Framework - Default class file

Class

Notifications_Event
Notifications Event class

Code

protected function subscriptions_conditions() {
  $add = db_or();
  foreach ($this
    ->subscription_types() as $type) {
    $condition = notifications_subscription($type)
      ->event_conditions($this);
    if ($condition && $condition
      ->count()) {
      $add
        ->condition($condition);
    }
  }
  return $add && $add
    ->count() ? $add : NULL;
}