You are here

function Messaging_Template::get_text in Messaging 6.3

Same name and namespace in other branches
  1. 7 messaging_template/messaging_template.inc \Messaging_Template::get_text()

Get text elements as array

Parameters

$key: Text part key to return, like 'subject', 'body'...

3 calls to Messaging_Template::get_text()
Messaging_Template::get_body in messaging_template/messaging_template.inc
Get body parts
Messaging_Template::get_string in messaging_template/messaging_template.inc
Get text element as string
Messaging_Template::get_subject in messaging_template/messaging_template.inc
Get subject message parts

File

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

Class

Messaging_Template
Messaging Template class

Code

function get_text($key, $method = NULL, $language = NULL) {
  $method = $method ? $method : $this
    ->get_method();
  $language = $language ? $language : $this
    ->get_language();
  $content = $this
    ->get_content($method, $language);
  return isset($content[$key]) ? $content[$key] : NULL;
}