function theme_notifications_digest_short_body in Notifications 5
Same name and namespace in other branches
- 6.4 notifications_digest/notifications_digest.module \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()
- notifications_process_digest_short in ./
notifications.cron.inc  - Digest multiple events in a single message, short format.
 - Notifications_Templates_Tests::testNotificationsTemplateAPI in tests/
notifications_templates.test  - Play with creating, retrieving, deleting a pair subscriptions
 
File
- ./
notifications.cron.inc, line 728  
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'];
      foreach ($data['line'] as $line) {
        $body['content'][] = theme('notifications_digest_short_line', $line, $data['group']);
      }
      $body['content'][] = $data['group']['footer'];
    }
  }
  $body['footer'] = $text['footer'];
  return $body;
}