function messaging_template_messaging_template in Messaging 6.3
Implementation of hook_messaging_template();
Provide a basic template, usefull as a fallback and for tests
Parameters
$op: Operation, type of information to retrieve
$type: Template type
File
- messaging_template/
messaging_template.module, line 311 - Template system for Messaging Framework
Code
function messaging_template_messaging_template($op, $type = NULL, $langcode = NULL) {
switch ($op) {
case 'types':
$info['messaging'] = array(
'title' => t('Messaging template', array(), $langcode),
'description' => t('Fallback for all templates.', array(), $langcode),
);
return $info;
case 'templates':
// Generic notifications event
$info['messaging-template'] = array(
'module' => 'messaging_template',
'type' => 'messaging',
'title' => t('Messaging template', array(), $langcode),
'description' => t('Fallback for all message templates.', array(), $langcode),
);
return $info;
case 'keys':
if ($type == 'messaging-template') {
return array(
'subject' => t('Subject', array(), $langcode),
'header' => t('Header', array(), $langcode),
'main' => t('Content', array(), $langcode),
'footer' => t('Footer', array(), $langcode),
);
}
break;
case 'defaults':
// Event notifications
if ($type == 'messaging-template') {
return array(
'subject' => t('Message for [user] from [site-name]', array(), $langcode),
'header' => t("Greetings [user],", array(), $langcode),
'main' => t("This is a test message from [site-name]", array(), $langcode),
'footer' => array(
t('This is an automatic message from [site-name] [site-url]', array(), $langcode),
),
);
}
break;
case 'tokens':
break;
}
}