10 defined(
'JPATH_PLATFORM') or die;
32 public function render($module, $attribs = array(), $content = null)
34 if (!is_object($module))
36 $title = isset($attribs[
'title']) ? $attribs[
'title'] : null;
38 $module = JModuleHelper::getModule($module, $title);
40 if (!is_object($module))
42 if (is_null($content))
53 $module =
new stdClass;
54 $module->params = null;
55 $module->module = $tmp;
67 if (!is_null($content))
69 $module->content = $content;
77 if (isset($attribs[
'params']))
80 $template_params->
loadString(html_entity_decode($attribs[
'params'], ENT_COMPAT,
'UTF-8'));
81 $params->merge($template_params);
82 $module = clone $module;
83 $module->params = (string) $params;
88 $cachemode = $params->get(
'cachemode',
'oldstatic');
90 if ($params->get(
'cache', 0) == 1 && $conf->get(
'caching') >= 1 && $cachemode !=
'id' && $cachemode !=
'safeuri')
94 $cacheparams =
new stdClass;
95 $cacheparams->cachemode = $cachemode;
96 $cacheparams->class =
'JModuleHelper';
97 $cacheparams->method =
'renderModule';
98 $cacheparams->methodparams = array($module, $attribs);
100 $contents = JModuleHelper::ModuleCache($module, $params, $cacheparams);
105 $contents = JModuleHelper::renderModule($module, $attribs);