You are here

function Messaging_Template::get_language in Messaging 6.3

Get language, default to parent's

5 calls to Messaging_Template::get_language()
Messaging_Template::build in messaging_template/messaging_template.inc
Build a new message for method, destination
Messaging_Template::get_part in messaging_template/messaging_template.inc
Get template part, FALSE if not found
Messaging_Template::get_text in messaging_template/messaging_template.inc
Get text elements as array
Messaging_Template::text_part in messaging_template/messaging_template.inc
Get template text part, FALSE if not found
Messaging_Template::xget_part in messaging_template/messaging_template.inc

File

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

Class

Messaging_Template
Messaging Template class

Code

function get_language($property = NULL) {

  // Either the template has a language or has a parent who's got it
  if (isset($this->language)) {
    return $property ? $this->language->{$property} : $this->language;
  }
  elseif (isset($this->parent)) {
    return $this->parent
      ->get_language($property);
  }
  else {
    return language_default($property);
  }
}