You are here

protected function Messaging_Message_Template::element_defaults in Messaging 7

Overrides Messaging_Template::element_defaults

File

messaging_template/messaging_template.inc, line 462
Drupal Messaging Framework - Text filtering functions

Class

Messaging_Message_Template
Template for a full message (subject, body, etc..)

Code

protected function element_defaults($name) {
  switch ($name) {
    case 'subject':
      $defaults = array(
        '#type' => 'messaging_template_subject',
      );
      break;
    case 'body':
      $defaults = array(
        '#type' => 'messaging_template_body',
        '#parts' => array(
          'header',
          'content',
          'footer',
        ),
      );
      break;
    case 'header':
    case 'content':
    case 'footer':
      $defaults = array(
        '#type' => 'messaging_template_text',
      );
      break;
    default:
      $defaults = array();
  }
  return $defaults + parent::element_defaults($name);
}