You are here

function Messaging_Template::text_part in Messaging 6.3

Get template text part, FALSE if not found

Here we translate MESSAGING_EMPTY into an empty string

File

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

Class

Messaging_Template
Messaging Template class

Code

function text_part($type, $key, $method = NULL, $language = NULL) {
  $method = $method ? $method : $this
    ->get_method();
  $language = $language ? $language : $this
    ->get_language();
  $this
    ->build_template($type, $method, $language);
  $part = $this
    ->get_part($key, $type, $method);
  $text = $part ? $part->template : FALSE;
  $this
    ->debug('Getting text part', array(
    'type' => $type,
    'key' => $key,
    'method' => $method,
    'text' => $text,
  ));
  return $text;
}