function notifications_info in Notifications 6
Same name and namespace in other branches
- 6.4 notifications.module \notifications_info()
- 6.2 notifications.module \notifications_info()
- 6.3 notifications.module \notifications_info()
- 7 notifications.module \notifications_info()
Get information from an array of data
3 calls to notifications_info()
- notifications_subscription_fields in ./
notifications.module - Get information about subscriptions fields
- notifications_subscription_types in ./
notifications.module - Get info about subscription types
- notifications_ui_subscription_types in notifications_ui/
notifications_ui.module - Get info about subscription types, exclude custom types
File
- ./
notifications.module, line 959 - Notifications module
Code
function notifications_info(&$data, $type = NULL, $field = NULL) {
if ($field && $type) {
return isset($data[$type][$field]) ? $data[$type][$field] : NULL;
}
elseif ($field) {
$return = array();
foreach ($data as $id => $info) {
$return[$id] = $info[$field];
}
return $return;
}
elseif ($type) {
return isset($data[$type]) ? $data[$type] : array();
}
else {
return $data;
}
}