public static function Notifications_Event::template_map in Notifications 6.4
Get template name for event type
Replaces notifications_event_get_template()
Parameters
$event_type: Event type key
2 calls to Notifications_Event::template_map()
- notifications_admin_events_tree_form in ./
notifications.admin.inc - Build tree of event types
- Notifications_Event::get_template in includes/
notifications_event.class.inc - Get template name
File
- includes/
notifications_event.class.inc, line 150 - Drupal Notifications Framework - Default class file
Class
- Notifications_Event
- Message destination class
Code
public static function template_map($event_type) {
if (!isset(self::$_templates)) {
self::$_templates = variable_get('notifications_event_template', array());
}
if (!isset(self::$_templates[$event_type])) {
if ($template = notifications_event_types($event_type, 'template')) {
// Use default value from event definition
self::$_templates[$event_type] = $template;
}
else {
// Mark as false for not searching again
self::$_templates[$event_type] = FALSE;
}
}
return self::$_templates[$event_type];
}