You are here

function Messaging_Template_Part::get_content in Messaging 6.3

Overrides Messaging_Template_Element::get_content

File

messaging_template/messaging_template.inc, line 531
Base classes for messaging templates

Class

Messaging_Template_Part
Each text part to be rendered independently

Code

function get_content($method, $language) {
  if (!isset($this->text[$method][$language->language])) {
    if ($part = $this->template
      ->get_part($this->key, NULL, $method, $language)) {
      $text = $part->template;
    }
    else {
      $text = isset($this->default) ? $this->default : '';
    }
    $this->text[$method][$language->language] = $text;
  }
  return $this->text[$method][$language->language];
}