function notifications_object_condition_fields in Notifications 6.4
Get field conditions for this specific object
1 call to notifications_object_condition_fields()
- notifications_notifications_event in ./
notifications.module - Implementation of hook notifications_event()
File
- includes/
object.inc, line 109 - Notifications object and fields
Code
function notifications_object_condition_fields($type, $object) {
if ($object = notifications_object_load($type, $object)) {
// As this does an array_merge_recursive() we get grouped field => array(value1, value2..)
$fields = module_invoke_all('notifications_object_' . $type, 'conditions', $object);
// Now we just need to filter out duplicate values
foreach ($fields as $key => $value) {
if (is_array($value)) {
$fields[$key] = array_unique($value);
}
}
return $fields;
}
}