You are here

protected function Messaging_Message_Text::build_parts in Messaging 7

Build array of message parts

2 calls to Messaging_Message_Text::build_parts()
Messaging_Message_Text::build in ./messaging.text.inc
Build message parts as renderable array
Messaging_Message_Text::render in ./messaging.text.inc
Render message parts

File

./messaging.text.inc, line 68
Basic message templates and theming

Class

Messaging_Message_Text
Very simple template with plain subject, header, content, footer texts

Code

protected function build_parts($parts) {
  $build = array();
  foreach ($parts as $name) {
    if ($name == 'body') {
      $build['body'] = $this
        ->build('header', 'content', 'footer');
    }
    else {
      $build[$name] = isset($this->elements[$name]) ? $this->elements[$name] : array();
    }
  }
  return $build + array(
    '#type' => 'messaging_text',
    '#options' => $this->options,
    '#format' => $this->format,
    '#method' => $this->method,
  );
}