You are here

function Notifications_Event::get_template in Notifications 6.4

Same name and namespace in other branches
  1. 7 notifications.event.inc \Notifications_Event::get_template()

Get template name

1 call to Notifications_Event::get_template()
Notifications_Event::message_part in includes/notifications_event.class.inc
Get message template for event

File

includes/notifications_event.class.inc, line 87
Drupal Notifications Framework - Default class file

Class

Notifications_Event
Message destination class

Code

function get_template() {
  if (!isset($this->template)) {
    if ($template = self::template_map($this->typekey)) {
      $this->template = $template;
    }
    else {

      // Build default that will be like notifications-event-type-action
      $parts = array(
        $this->module,
        'event',
        $this->type,
        $this->action,
      );
      $this->template = implode('-', array_filter($parts));
    }
  }
  return $this->template;
}