Source for file helper.php
Documentation is available at helper.php
* @package Joomla.Administrator
* @subpackage mod_quickicon
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* Helper for mod_quickicon
* @package Joomla.Administrator
* @subpackage mod_quickicon
protected static $buttons =
array();
* 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.
* @param JObject $params The module parameters.
* @return array An array of buttons
if (!isset
(self::$buttons[$key]))
$context =
$params->get('context', 'mod_quickicon');
if ($context ==
'mod_quickicon')
// Load mod_quickicon language file in case this method is called before rendering the module
JFactory::getLanguage()->load('mod_quickicon');
self::$buttons[$key] =
array(
'link' =>
JRoute::_('index.php?option=com_content&task=article.add'),
'icon' =>
'header/icon-48-article-add.png',
'text' =>
JText::_('MOD_QUICKICON_ADD_NEW_ARTICLE'),
'access' =>
array('core.manage', 'com_content', 'core.create', 'com_content'),
'group' =>
'MOD_QUICKICON_CONTENT'
'link' =>
JRoute::_('index.php?option=com_content'),
'icon' =>
'header/icon-48-article.png',
'text' =>
JText::_('MOD_QUICKICON_ARTICLE_MANAGER'),
'access' =>
array('core.manage', 'com_content'),
'group' =>
'MOD_QUICKICON_CONTENT'
'link' =>
JRoute::_('index.php?option=com_categories&extension=com_content'),
'icon' =>
'header/icon-48-category.png',
'text' =>
JText::_('MOD_QUICKICON_CATEGORY_MANAGER'),
'access' =>
array('core.manage', 'com_content'),
'group' =>
'MOD_QUICKICON_CONTENT'
'link' =>
JRoute::_('index.php?option=com_media'),
'icon' =>
'header/icon-48-media.png',
'text' =>
JText::_('MOD_QUICKICON_MEDIA_MANAGER'),
'access' =>
array('core.manage', 'com_media'),
'group' =>
'MOD_QUICKICON_CONTENT'
'link' =>
JRoute::_('index.php?option=com_menus'),
'icon' =>
'header/icon-48-menumgr.png',
'text' =>
JText::_('MOD_QUICKICON_MENU_MANAGER'),
'access' =>
array('core.manage', 'com_menus'),
'group' =>
'MOD_QUICKICON_STRUCTURE'
'link' =>
JRoute::_('index.php?option=com_users'),
'icon' =>
'header/icon-48-user.png',
'text' =>
JText::_('MOD_QUICKICON_USER_MANAGER'),
'access' =>
array('core.manage', 'com_users'),
'group' =>
'MOD_QUICKICON_USERS'
'link' =>
JRoute::_('index.php?option=com_modules'),
'icon' =>
'header/icon-48-module.png',
'text' =>
JText::_('MOD_QUICKICON_MODULE_MANAGER'),
'access' =>
array('core.manage', 'com_modules'),
'group' =>
'MOD_QUICKICON_STRUCTURE'
'link' =>
JRoute::_('index.php?option=com_config'),
'icon' =>
'header/icon-48-config.png',
'text' =>
JText::_('MOD_QUICKICON_GLOBAL_CONFIGURATION'),
'access' =>
array('core.manage', 'com_config', 'core.admin', 'com_config'),
'group' =>
'MOD_QUICKICON_CONFIGURATION'
'link' =>
JRoute::_('index.php?option=com_templates'),
'icon' =>
'header/icon-48-themes.png',
'text' =>
JText::_('MOD_QUICKICON_TEMPLATE_MANAGER'),
'access' =>
array('core.manage', 'com_templates'),
'group' =>
'MOD_QUICKICON_CONFIGURATION'
'link' =>
JRoute::_('index.php?option=com_languages'),
'icon' =>
'header/icon-48-language.png',
'text' =>
JText::_('MOD_QUICKICON_LANGUAGE_MANAGER'),
'access' =>
array('core.manage', 'com_languages'),
'group' =>
'MOD_QUICKICON_CONFIGURATION'
'link' =>
JRoute::_('index.php?option=com_installer'),
'icon' =>
'header/icon-48-extension.png',
'text' =>
JText::_('MOD_QUICKICON_INSTALL_EXTENSIONS'),
'access' =>
array('core.manage', 'com_installer'),
'group' =>
'MOD_QUICKICON_EXTENSIONS'
self::$buttons[$key] =
array();
// Include buttons defined by published quickicon plugins
JPluginHelper::importPlugin('quickicon');
$arrays = (array)
$app->triggerEvent('onGetIcons', array($context));
foreach ($arrays as $response)
foreach ($response as $icon)
'group' =>
'MOD_QUICKICON_EXTENSIONS'
self::$buttons[$key][] =
$icon;
return self::$buttons[$key];
* Classifies the $buttons by group
* @param array $buttons The buttons
* @return array The buttons sorted by groups
$groupedButtons =
array();
foreach ($buttons as $button)
$groupedButtons[$button['group']][] =
$button;
* Get the alternate title for the module
* @param JObject $params The module parameters.
* @param JObject $module The module.
* @return string The alternate title for the module.
public static function getTitle($params, $module)
$key =
$params->get('context', 'mod_quickicon') .
'_title';
if (JFactory::getLanguage()->hasKey($key))
Documentation generated on Tue, 19 Nov 2013 15:04:27 +0100 by phpDocumentor 1.4.3