Current Path :
/
home
/
develito
/
www
/
administrator
/
components
/
com_dmod
/
helpers
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/develito/www/administrator/components/com_dmod/helpers/dmod.php
<?php /*------------------------------------------------------------------------ # com_dmod - Dmod Module Manager # ------------------------------------------------------------------------ # author Jesus Vargas Garita # copyright Copyright (C) 2010 www.joomlahill.com. All Rights Reserved. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.joomlahill.com # Technical Support: Forum - http://www.joomlahill.com/forum -------------------------------------------------------------------------*/ defined('_JEXEC') or die; class DmodHelper { public static function addSubmenu($vName) { JHtmlSidebar::addEntry( JText::_('COM_DMOD_SUBMENU_MODULES'), 'index.php?option=com_dmod&view=dmods', $vName == 'dmods' ); JHtmlSidebar::addEntry( JText::_('COM_DMOD_SUBMENU_CATEGORIES'), 'index.php?option=com_categories&extension=com_dmod', $vName == 'categories' ); if ($vName=='categories') { JToolBarHelper::title( JText::sprintf('COM_CATEGORIES_CATEGORIES_TITLE',JText::_('com_dmod')), 'dmod-categories'); } } public static function getActions($categoryId = 0, $dmodId = 0) { $user = JFactory::getUser(); $result = new JObject; if (empty($dmodId) && empty($categoryId)) { $assetName = 'com_dmod'; $level = 'component'; } elseif (empty($dmodId)) { $assetName = 'com_dmod.category.'.(int) $categoryId; $level = 'category'; } else { $assetName = 'com_dmod.dmod.'.(int) $dmodId; $level = 'category'; } $actions = JAccess::getActions('com_dmod', $level); foreach ($actions as $action) { $result->set($action->name, $user->authorise($action->name, $assetName)); } return $result; } }