Your IP : 216.73.216.240


Current Path : /home/juvelize/www/administrator/components/com_ffgate/helpers/
Upload File :
Current File : /home/juvelize/www/administrator/components/com_ffgate/helpers/FFGate.php

<?php
/**
 * @package    FFGate
 * @author     Yves Hoppe <yves@compojoom.com>
 * @date       26.11.13
 *
 * @copyright  Copyright (C) 2008 - 2013 compojoom.com - Yves Hoppe. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */

// No direct access to this file
defined('_JEXEC') or die;

/**
 * Class FFGateHelper
 *
 * @since  1.0.0
 */
abstract class FFGateHelper
{
	/**
	 * Configure the Linkbar.
	 *
	 * @param   object  $submenu  - The submenu
	 *
	 * @return  void
	 */
	public static function addSubmenu($submenu)
	{
		$language = JFactory::getLanguage();
		$language->load('com_ffgate.sys', JPATH_ADMINISTRATOR, null, true);

		$view = JFactory::getApplication()->input->get('task');

		$active2 = ($view == 'controlcenter');
		JSubMenuHelper::addEntry(JText::_('COM_FFGATE_CONTROLCENTER'), 'index.php?option=com_ffgate&view=controlcenter', $active2);

		$subMenus = array(
			'sites' => 'COM_FFGATE_SITES',
			'settings' => 'COM_FFGATE_CONFIGURATION',
			'information' => 'COM_FFGATE_INFORMATIONS',
		);

		foreach ($subMenus as $key => $name)
		{
			$active = ($view == $key);

			if ($key == 'categories')
			{
				JSubMenuHelper::addEntry(JText::_($name), 'index.php?option=com_categories&extension=com_ffgate', $active);
			}
			else
			{
				JSubMenuHelper::addEntry(JText::_($name), "index.php?option=com_ffgate&view=" . $key, $active);
			}
		}

		$active = ($view == 'liveupdate');
		JSubMenuHelper::addEntry(JText::_('COM_FFGATE_LIVEUPDATE'), 'index.php?option=com_ffgate&view=liveupdate', $active);

		$document = JFactory::getDocument();
		$document->addStyleDeclaration('.icon-48-cadvancedslideshow ' .
			'{background-image: url(../media/com_ffgate/backend/images/icon-48.png);}');

		if ($submenu == 'categories')
		{
			$document->setTitle(JText::_('COM_FFGATE_CATEGORIES'));
		}
	}
}