You are here

function Messaging_Template::__construct in Messaging 6.3

Class constructor, create a template of given type

File

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

Class

Messaging_Template
Messaging Template class

Code

function __construct($type = 'messaging-template', $parent = NULL, $method = NULL, $language = NULL) {
  $this->type = $type;
  if ($parent) {
    $this->parent = $parent;
    $this->method = $method;
    $this->language = $language;
  }
  else {
    $this->language = $language ? $language : language_default();
    $this->method = $method ? $method : 'default';
    $this->objects = array(
      'global' => NULL,
    );
  }
}