function notifications_digest_line in Notifications 6.3
Same name and namespace in other branches
- 5 notifications.cron.inc \notifications_digest_line()
- 6.4 notifications_digest/notifications_digest.module \notifications_digest_line()
- 6 notifications.cron.inc \notifications_digest_line()
- 6.2 notifications.cron.inc \notifications_digest_line()
Digest each line, with some caching for performance
File
- notifications_digest/
notifications_digest.module, line 255 - Notifications message digest
Code
function notifications_digest_line($event, $method) {
static $digest = array();
if (!isset($digest[$event->eid][$method])) {
// The event may have an specific digest line, otherwise use template if present or even information
if (!empty($event->text['digest'])) {
$line = $event->text['digest'];
}
elseif ($part = notifications_message_part('event', 'digest', $method, $event)) {
$line = $part;
}
else {
// Get it from event information
$info = notifications_event_types($event->type, $event->action);
$line = $info['line'];
}
$digest[$event->eid][$method] = $line;
}
return $digest[$event->eid][$method];
}