You are here

function template_preprocess_messaging_template_body in Messaging 7

Preprocess message text

File

messaging_template/messaging_template.module, line 144
Messaging Template Drupal Messaging Framework

Code

function template_preprocess_messaging_template_body(&$variables) {
  $element = $variables['element'];

  // Add default template tokens
  $variables['tokens'] = $element['#template']
    ->get_tokens();

  // Render all body parts, not only 'header', 'content', 'footer'
  foreach (element_children($element) as $index) {
    $variables[$index] = isset($element[$index]) ? drupal_render($element[$index]) : '';
  }
}