function theme_notifications_digest_short_body in Notifications 6.4
Same name and namespace in other branches
- 5 notifications.cron.inc \theme_notifications_digest_short_body()
- 6 notifications.cron.inc \theme_notifications_digest_short_body()
- 6.2 notifications.cron.inc \theme_notifications_digest_short_body()
- 6.3 notifications_digest/notifications_digest.theme.inc \theme_notifications_digest_short_body()
Theme notifications digest
Parameters
$text: Array with message parts, currently only 'header' and 'footer'
$list: Structured array with list of digested items. For each object type 'type' => ( // Type may be node, user, etc... 'oid' => ( // One for each object, may be nid, uid... 'group' => Group title and footer 'line' => Array of lines, one for each related event ) )
Return value
Structured array with 'header', 'footer', and multiple text lines
2 theme calls to theme_notifications_digest_short_body()
- NotificationsTemplatesTests::testNotificationsTemplates in tests/
notifications_templates.test - Play with creating, retrieving, deleting a pair subscriptions
- notifications_digest_build_short in notifications_digest/
notifications_digest.module - Digest multiple events in a single message, short format.
File
- notifications_digest/
notifications_digest.module, line 393 - Notifications digest module
Code
function theme_notifications_digest_short_body($text, $list) {
$body['header'] = $text['header'];
foreach ($list as $type => $objects) {
foreach ($objects as $oid => $data) {
$body['content'][] = $data['group']['title'];
$body['content'][] = theme('notifications_digest_short_list', $data['line'], $data['group']);
$body['content'][] = $data['group']['footer'];
}
}
$body['footer'] = $text['footer'];
return $body;
}