- md5
- 9d143caba3d4096d26c03ab108ae034d
- sha1
- dc4687496ab746da7ef4d53500e3985ccc9450dc
- sha256
- 95ffddcc63d1afaf2eac44da2ac59a5813e938de0e79aa1e35e866c1f630226d
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
<?php
/**
* @package Joomla.Administrator
* @subpackage com_menus
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* The HTML Menus Menu Menus View.
*
* @package Joomla.Administrator
* @subpackage com_menus
* @since 1.6
*/
class MenusViewMenus extends JViewLegacy
{
protected $items;
protected $modules;
protected $pagination;
protected $state;
/**
* Display the view
*/
public function display($tpl = null)
{
$this->items = $this->get('Items');
$this->modules = $this->get('Modules');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
MenusHelper::addSubmenu('menus');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->addToolbar();
$this->sidebar = JHtmlSidebar::render();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT.'/helpers/menus.php';
$canDo = MenusHelper::getActions($this->state->get('filter.parent_id'));
JToolbarHelper::title(JText::_('COM_MENUS_VIEW_MENUS_TITLE'), 'menumgr.png');
if ($canDo->get('core.create'))
{
JToolbarHelper::addNew('menu.add');
}
if ($canDo->get('core.edit'))
{
JToolbarHelper::editList('menu.edit');
}
if ($canDo->get('core.delete'))
{
JToolbarHelper::divider();
JToolbarHelper::deleteList('', 'menus.delete');
}
JToolbarHelper::custom('menus.rebuild', 'refresh.png', 'refresh_f2.png', 'JTOOLBAR_REBUILD', false);
if ($canDo->get('core.admin'))
{
JToolbarHelper::divider();
JToolbarHelper::preferences('com_menus');
}
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_MENUS_MENU_MANAGER');
}
}
The same content is in 7 releases, Joomla 3.0.3 to 3.1.6. See them all, or every version of this file.