function notifications_lite_messaging_template in Notifications 6.3
Implementation of hook_messaging_template()
File
- notifications_lite/
notifications_lite.module, line 240 - Simple notifications API
Code
function notifications_lite_messaging_template($op, $type = NULL, $langcode = NULL) {
switch ($op) {
case 'templates':
// Generic notifications lite event (message)
$info['notifications-event-lite'] = array(
'module' => 'notifications_lite',
'type' => 'notifications',
'title' => t('Simple notifications', array(), $langcode),
'help' => t('The subject and main body will be provided by the event itself', array(), $langcode),
'description' => t('Simple notifications triggered by other modules using the Notifications Lite API module.', array(), $langcode),
'fallback' => 'notifications-event',
);
$info['notifications-digest-lite'] = array(
'module' => 'notifications_lite',
'type' => 'notifications',
'title' => t('Group of simple notifications', array(), $langcode),
'description' => t('Simple notifications digested with short format.', array(), $langcode),
'help' => t('Every line of the digest will be a separate message.', array(), $langcode),
'fallback' => 'notifications-digest',
);
return $info;
case 'keys':
switch ($type) {
case 'notifications-event-lite':
// The other parts for these messages will be given by the event itself
return array(
'header' => t('Header', array(), $langcode),
'footer' => t('Footer', array(), $langcode),
);
break;
}
break;
case 'defaults':
// Event notifications
switch ($type) {
case 'notifications-event-lite':
return array(
'header' => t("Greetings, [user].", array(), $langcode),
'footer' => array(
t('This is an automatic message from [site-name]', array(), $langcode),
t('To manage your subscriptions, browse to [subscriptions-manage]', array(), $langcode),
),
);
case 'notifications-digest-lite':
return array(
'title' => t('Generic messages', array(), $langcode),
'closing' => '...',
);
}
break;
}
}