function Notifications_Event::message_part in Notifications 6.4
Get message template for event
Replaces notifications_event_message_part()
Parameters
$event: Message type to send, either 'event' or 'digest'
$key: Id of message part, ie 'header'
$method: Method by which message will be sent. Normally 'mail'
$param: Event data if we have a single event (type = event), none if we are digesting multiple events (type = digest)
Return value
Part of the message with tokens for replacement.
File
- includes/
notifications_event.class.inc, line 118 - Drupal Notifications Framework - Default class file
Class
- Notifications_Event
- Message destination class
Code
function message_part($key, $method, $language, $module = 'notifications') {
// If event passed check for predefined text or get optional keys from event
if ($text = $this
->get_text($key)) {
return $text;
}
elseif ($template = $this
->get_template()) {
$text = messaging_template_text_part($template, $key, $method, $language);
}
// Default, template not found, return some information if debugging
return isset($text) ? $text : '';
}