You are here

protected static function Messaging_Message::prepare_element in Messaging 7

Build text parts for drupal_render()

File

./messaging.message.inc, line 384
Drupal Messaging Framework - Message class file

Class

Messaging_Message
Message class

Code

protected static function prepare_element($text) {
  if (is_array($text)) {
    foreach (element_children($text) as $key) {
      $text[$key] = self::prepare_element($text[$key]);
    }
    return $text;
  }
  else {

    // This should be a string
    return array(
      '#markup' => $text,
    );
  }
}