You are here

function Notifications_Subscription::has_condition in Notifications 7

Same name and namespace in other branches
  1. 6.4 includes/notifications_subscription.class.inc \Notifications_Subscription::has_condition()

Check whether we have a given condition

File

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

Class

Notifications_Subscription
Common base for subscription type and subscription instance

Code

function has_condition($type, $value) {
  $conds = $this
    ->get_conditions($type);
  return isset($conds) && (is_array($conds) && in_array($value, $conds) || !is_array($conds) && $conds === $value);
}