You are here

function notifications_digest_group in Notifications 5

Same name and namespace in other branches
  1. 6.4 notifications_digest/notifications_digest.module \notifications_digest_group()
  2. 6 notifications.cron.inc \notifications_digest_group()
  3. 6.2 notifications.cron.inc \notifications_digest_group()
  4. 6.3 notifications_digest/notifications_digest.module \notifications_digest_group()

Get text parts for digests.

Useful to get the group title and footer given some kind of digesting

1 call to notifications_digest_group()
notifications_process_digest_short in ./notifications.cron.inc
Digest multiple events in a single message, short format.

File

./notifications.cron.inc, line 764

Code

function notifications_digest_group($digest, $part, $method) {
  static $texts = array();
  $type = $digest['type'];
  $value = $digest['value'];
  if (!isset($texts[$type][$value][$part][$method])) {
    if ($line = notifications_message_part('digest', $part, $method, array(
      $type,
      $digest['field'],
    ))) {
      $output = $line;
    }
    else {
      $output = '';
    }
    $texts[$type][$value][$part][$method] = $output;
  }
  return $texts[$type][$value][$part][$method];
}