function Notifications_Subscription::object_conditions in Notifications 7
Get OR'd field conditions for this subscription type and object
Conditions will look like f.type = 'nid' AND f.value = 100 f.type = 'term' AND f.value IN (1, 2, 3, 4)
1 call to Notifications_Subscription::object_conditions()
- Notifications_Subscription::event_conditions in ./
notifications.subscription.inc - Get event conditions OR'd
File
- ./
notifications.subscription.inc, line 745 - Drupal Notifications Framework - Default class file
Class
- Notifications_Subscription
- Common base for subscription type and subscription instance
Code
function object_conditions($objects) {
$add = db_or();
foreach ($objects as $object) {
foreach ($this
->get_unique_fields() as $field) {
if ($value = $field
->object_value($object)) {
$condition = $field
->get_value_condition($value);
$add
->condition($condition);
}
}
}
return $add;
}