Ejemplo n.º 1
0
 /**
  * Renders modules provided by getModules()
  *
  * @param   string  $pos  The position name
  * @return  array   An array of rendered modules
  * @since   1.5.5
  */
 public static function getRenderedModules($pos)
 {
     static $renderer;
     $modules = JoomHelper::getModules($pos);
     if (count($modules)) {
         if (!isset($renderer)) {
             $document = JFactory::getDocument();
             $renderer = $document->loadRenderer('module');
         }
         $style = -2;
         $params = array('style' => $style);
         foreach ($modules as $key => $module) {
             $modules[$key]->rendered = $renderer->render($module, $params);
         }
     }
     return $modules;
 }