drupal_get_messages

Versions
4.6 – 4.7
drupal_get_messages()
5 – 7
drupal_get_messages($type = NULL, $clear_queue = TRUE)

Return all messages that have been set.

As a side effect, this function clears the message queue.

▾ 1 function calls drupal_get_messages()

theme_status_messages in includes/theme.inc
Returns themed set of status and/or error messages. The messages are grouped by type.

Code

includes/bootstrap.inc, line 618

<?php
function drupal_get_messages() {
  $messages = drupal_set_message();
  $_SESSION['messages'] = array();

  return $messages;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.