<?php /** * @package Minima * @subpackage mod_myshortcuts * @author Marco Barbosa * @copyright Copyright (C) 2010 Webnific. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // No direct access. defined('_JEXEC') or die; $buttons = ModMyshortcutsHelper::getButtons(); // get the current logged in user $currentUser = JFactory::getUser(); $lang = JFactory::getLanguage(); //$lang->load('mod_menu', JPATH_ADMINISTRATOR, $lang->getDefault(), false, false); $lang->load('mod_menu', JPATH_ADMINISTRATOR, 'en-GB', true); $lang->load('mod_menu', JPATH_ADMINISTRATOR, $lang->getDefault(), true); $lang->load('mod_menu', JPATH_ADMINISTRATOR, null, true); ?> <ul> <li class="home"> <a href="index.php">Dashboard</a> </li> <?php if( $currentUser->authorize( array('core.manage','com_config') ) ): ?> <li>
/** * Helper method to return button list. * * This method returns the array by reference so it can be * used to add custom buttons or remove default ones. * * @return array An array of buttons */ public static function &getButtons() { if ( empty(self::$buttons) ) { self::$buttons = array( array( 'link' => JRoute::_('index.php?option=com_config'), 'text' => JText::_('MOD_MYSHORTCUTS_CONFIGURATION'), 'access' => array('core.manage','com_config') ), array( 'link' => JRoute::_('index.php?option=com_content'), 'text' => JText::_('MOD_MYSHORTCUTS_ARTICLES'), 'access' => array('core.manage','com_content') ), array( 'link' => JRoute::_('index.php?option=com_content&task=article.add'), 'text' => JText::_('MOD_MYSHORTCUTS_ADD_ARTICLE'), 'access' => array('core.manage','com_content') ), array( 'link' => JRoute::_('index.php?option=com_media'), 'text' => JText::_('MOD_MYSHORTCUTS_MEDIA'), 'access' => array('core.manage','com_media') ), array( 'link' => JRoute::_('index.php?option=com_menus&view=menus'), 'text' => JText::_('MOD_MYSHORTCUTS_MENUS'), 'access' => array('core.manage','com_menus') ), array( 'link' => JRoute::_('index.php?option=com_users'), 'text' => JText::_('MOD_MYSHORTCUTS_USERS'), 'access' => array('core.manage','com_users') ), /*array( 'link' => JRoute::_('index.php?option=com_modules'), 'text' => JText::_('MOD_SHORTCUTS_MODULES'), 'access' => array('core.manage','com_modules') ),*/ array( 'link' => JRoute::_('index.php?option=com_installer'), 'text' => JText::_('MOD_MYSHORTCUTS_EXTEND'), 'access' => array('core.manage','com_installer') ), array( 'link' => JRoute::_('index.php?option=com_admin&view=help'), 'text' => JText::_('MOD_MYSHORTCUTS_HELP'), 'access' => array('core.manage','com_admin') ) ); } return self::$buttons; }