Source code for file /joomla/document/html/renderer/module.php
Documentation is available at module.php
* @version $Id: module.php 10707 2008-08-21 09:52:47Z eddieajau $
* @package Joomla.Framework
* @copyright Copyright (C) 2005 - 2008 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 Module renderer
* @package Joomla.Framework
* Renders a module script and returns the results as a string
* @param string $name The name of the module to render
* @param array $params Associative array of values
* @return string The output of the script
function render( $module, $params =
array(), $content =
null )
$title = isset
($params['title']) ?
$params['title'] :
null;
* If module isn't found in the database but data has been pushed in the buffer
$module =
new stdClass();
// get the user and configuration object
// set the module content
$module->content =
$content;
if ($mod_params->get('cache', 0) &&
$conf->getValue( 'config.caching' ))
$cache->setLifeTime( $mod_params->get( 'cache_time', $conf->getValue( 'config.cachetime' ) *
60 ) );
$cache->setCacheValidation(true);
$contents =
$cache->get( array('JModuleHelper', 'renderModule'), array( $module, $params ), $module->id.
$user->get('aid', 0) );