function theme_original_status_messages in Purr Messages 7.2
Same name and namespace in other branches
- 8.2 purr_messages.module \theme_original_status_messages()
- 6.2 purr_messages.module \theme_original_status_messages()
- 6 purr_messages.module \theme_original_status_messages()
- 7 purr_messages.module \theme_original_status_messages()
Return a themed set of status and/or error messages. The messages are grouped by type.
This is the original output which we use if purr messages is turned off.
@internal param $type String containing a message type. Used to set the class on the message div.
@internal param $messages An array, each containing a message.
Parameters
$vars:
Return value
string A string containing the formatted messages.
2 theme calls to theme_original_status_messages()
- purr_messages_status_messages in ./
purr_messages.module - Checks options and determines which type of message to return to the theme layer.
- _purr_messages_purr in ./
purr_messages.module - Builds and returns the formatted purr message code
File
- ./
purr_messages.module, line 342 - Purr Messages A jQuery based override of Drupal's core message system
Code
function theme_original_status_messages($vars) {
$type = $vars['type'];
$messages = $vars['messages'];
$output = '';
$output .= "<div class=\"messages {$type}\">\n";
if (count($messages) > 1) {
$output .= " <ul>\n";
foreach ($messages as $message) {
$output .= ' <li>' . $message . "</li>\n";
}
$output .= " </ul>\n";
}
else {
$output .= $messages[0];
}
$output .= "</div>\n";
return $output;
}