diff options
author | Jennifer Hodgdon <yahgrp@poplarware.com> | 2012-09-04 09:39:58 -0700 |
---|---|---|
committer | Jennifer Hodgdon <yahgrp@poplarware.com> | 2012-09-04 09:39:58 -0700 |
commit | 89512a01cb59df7e944c02a44cc88e2d185c51a5 (patch) | |
tree | 228577c3a240af036e46ba7330d96f03b85056eb | |
parent | f2aa3cc200a192f568742459e815b75b4e2db3dd (diff) | |
download | brdo-89512a01cb59df7e944c02a44cc88e2d185c51a5.tar.gz brdo-89512a01cb59df7e944c02a44cc88e2d185c51a5.tar.bz2 |
Issue #1765918 by TravisCarden: Fix docs for drupal_get_messages function
-rw-r--r-- | includes/bootstrap.inc | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 03e58802a..ab693dc52 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -1756,18 +1756,29 @@ function drupal_set_message($message = NULL, $type = 'status', $repeat = TRUE) { } /** - * Returns all messages that have been set. + * Returns all messages that have been set with drupal_set_message(). * - * @param $type - * (optional) Only return messages of this type. - * @param $clear_queue - * (optional) Set to FALSE if you do not want to clear the messages queue + * @param string $type + * (optional) Limit the messages returned by type. Defaults to NULL, meaning + * all types. These values are supported: + * - NULL + * - 'status' + * - 'warning' + * - 'error' + * @param bool $clear_queue + * (optional) If this is TRUE, the queue will be cleared of messages of the + * type specified in the $type parameter. Otherwise the queue will be left + * intact. Defaults to TRUE. * - * @return - * An associative array, the key is the message type, the value an array - * of messages. If the $type parameter is passed, you get only that type, - * or an empty array if there are no such messages. If $type is not passed, - * all message types are returned, or an empty array if none exist. + * @return array + * A multidimensional array with keys corresponding to the set message types. + * The indexed array values of each contain the set messages for that type. + * The messages returned are limited to the type specified in the $type + * parameter. If there are no messages of the specified type, an empty array + * is returned. + * + * @see drupal_set_message() + * @see theme_status_messages() */ function drupal_get_messages($type = NULL, $clear_queue = TRUE) { if ($messages = drupal_set_message()) { |