Example #1
0
 function render($position)
 {
     /** @var $gantry Gantry */
     global $gantry;
     JHTML::_('behavior.framework', true);
     if ($gantry->browser->platform != 'iphone' && $gantry->browser->platform != 'ipad' && $gantry->browser->platform != 'android') {
         return false;
     }
     gantry_import('facets.menu.gantrymenu');
     $params = $gantry->getParams($this->_feature_name, true);
     $module_params = '';
     foreach ($params as $param_name => $param_value) {
         $module_params .= $param_name . "=" . $param_value['value'] . "\n";
     }
     $passing_params = new GantryRegistry();
     $passing_params->loadString($module_params, 'INI');
     $gantrymenu = new GantryMenu($passing_params);
     return $gantrymenu->render($passing_params);
 }
Example #2
0
 function render($position = "")
 {
     global $gantry;
     if ($gantry->browser->platform != 'iphone' && $gantry->browser->platform != 'ipad' && $gantry->browser->platform != 'android') {
         return false;
     }
     gantry_import('facets.menu.gantrymenu');
     $params = $gantry->getParams($this->_feature_name, true);
     $module_params = '';
     foreach ($params as $param_name => $param_value) {
         $module_params .= $param_name . "=" . $param_value['value'] . "\n";
     }
     $passing_params = new JParameter($module_params);
     $gantrymenu = GantryMenu::getInstance($passing_params);
     return $gantrymenu->render($passing_params);
 }
 function render($params)
 {
     $theme_name = $params->get('theme', 'basic');
     $this->_loadTheme($theme_name);
     // Run the basic formatter
     GantryMenu::_applyBasicFormatting($this->_menudata);
     if (!empty($this->_formatter)) {
         $this->_formatter->format_tree($this->_menudata);
     }
     // format the menu data $menu is passed to the layout
     $menu =& $this->_menudata;
     $menurender = "Unable to render menu missing layout.php for theme " . $theme_name;
     if (!empty($this->_layout_path) && file_exists($this->_layout_path) && is_readable($this->_layout_path)) {
         ob_start();
         require $this->_layout_path;
         $menurender = ob_get_contents();
         ob_end_clean();
     }
     return $menurender;
 }
Example #4
0
 protected function initializeMenu($instance = null)
 {
     $menu = null;
     if (null == $instance) {
         $instance = $this->getInstance();
     }
     $theme_info = self::$themes[$instance['theme']];
     $theme = new $theme_info['class']();
     $menu = new GantryMenu($theme, $instance);
     $menu->initialize();
     return $menu;
 }