function Notifications_Subscription::has_condition in Notifications 6.4
Same name and namespace in other branches
- 7 notifications.subscription.inc \Notifications_Subscription::has_condition()
Check whether we have a given condition
File
- includes/
notifications_subscription.class.inc, line 467 - Drupal Notifications Framework - Default class file
Class
- Notifications_Subscription
- Message destination class
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);
}