function renderMenusMenu($active) { $menus = AdminPraise3MenuHelper::getMenus(); $links['parent'] = array('url' => 'index.php?option=com_menus', 'text' => 'MENUS'); $links['children'] = array(); for ($i = 0; $i < count($menus); $i++) { $menu = $menus[$i]; $url = 'index.php?option=com_menus&task=view&menutype=' . $menu->menutype; $newLink = array('url' => $url, 'text' => $menu->title); $newLink['children'] = array(array('url' => $url . '&task=newItem', 'text' => JText::_('NEW') . ' ' . $menu->title . ' ' . JText::_('ITEM'))); $links['children'][] = $newLink; } return $this->renderDropdown($links, $active); }
<?php defined('_JEXEC') or die('Restricted access'); $menu = AdminPraise3Menu::getInstance(); $html = null; if ($this->get('option') == "com_content" || $this->get('option') == "com_sections" || $this->get('option') == "com_categories" && $this->get('scope') == "content" || $this->get('option') == "com_frontpage") { $html .= $menu->renderSubmenu('content'); } if ($this->get('option') == "com_menus") { $menus = AdminPraise3MenuHelper::getMenus(); $links = array(); for ($i = 0; $i < count($menus); $i++) { $m = $menus[$i]; $url = 'index.php?option=com_menus&task=view&menutype=' . $m->menutype; $newLink = array('url' => $url, 'text' => $m->title); $newLink['children'] = array(array('url' => $url . '&task=newItem', 'text' => JText::_('NEW') . ' ' . $m->title . ' ' . JText::_('ITEM'))); $links[] = $newLink; } $html .= $menu->renderChildren($links, 0, false); } elseif ($this->get('option') == "com_templates") { $html .= $menu->renderSubmenu('templates'); } elseif ($this->get('option') == "com_modules") { $html .= $menu->renderSubmenu('modules'); } elseif ($this->get('option') == "com_plugins") { $html .= $menu->renderSubmenu('plugins'); } elseif ($this->get('ap_task') == "list_components") { $html .= $menu->renderSubmenu('components'); } elseif ($this->get('option') == "com_users") { $html .= $menu->renderSubmenu('users'); //elseif (($this->get('ap_task') == "admin") && ($this->_user->get('gid') > 24) || ($this->get('option') =="com_cpanel") && ($this->get('ap_task_set') !="list_components") && ($this->_user->get('gid') > 24)) : // $html .= $menu->renderSubmenu('cpanel');