You are here

function library_mail_tokens in Library 6

Same name and namespace in other branches
  1. 5.2 library.actions.inc \library_mail_tokens()
  2. 6.2 library.actions.inc \library_mail_tokens()
  3. 7 library.actions.inc \library_mail_tokens()
1 call to library_mail_tokens()
library_mail in ./library.actions.inc
Implementation of hook_mail()

File

./library.actions.inc, line 228
Hooks into core Drupal actions module

Code

function library_mail_tokens($params, $language) {
  $items = '';
  foreach ($params['items'] as $id => $values) {
    $items .= $values['item_name'] . ' (Due ' . format_date($values['due_date'], 'short') . ') ';
  }
  $tokens = array(
    '!patronname' => $params['patron']['patron_name'],
    '!site' => variable_get('site_name', 'Drupal'),
    '!items' => $items,
  );
  return $tokens;
}