Source code for file /joomla/document/html/renderer/message.php
Documentation is available at message.php
* @version $Id: message.php 6472 2007-02-03 10:47:26Z pasamio $
* @package Joomla.Framework
* @copyright Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
// Check to ensure this file is within the rest of the framework
* JDocument system message renderer
* @package Joomla.Framework
* Renders the error stack and returns the results as a string
* @param string $name (unused)
* @param array $params Associative array of values
* @return string The output of the script
function render($name =
null, $params =
array (), $content =
null)
$messages =
$mainframe->getMessageQueue();
// Build the sorted message list
foreach ($messages as $msg)
if (isset
($msg['type']) && isset
($msg['message'])) {
$lists[$msg['type']][] =
$msg['message'];
// If messages exist render them
// Build the return string
$contents .=
"\n<dl id=\"system-message\" class=\"message fade\">";
foreach ($lists as $type =>
$msgs)
$contents .=
"\n<dt class=\"".
strtolower($type).
"\">".
JText::_( $type ).
"</dt>";
$contents .=
"\n<dd class=\"".
strtolower($type).
"\">";
$contents .=
"\n\t\t<li>".
$msg.
"</li>";
$contents .=
"\n\t</ul>";