Source for file helper.php

Documentation is available at helper.php

  1. <?php
  2. /**
  3.  * @package    Joomla.Administrator
  4.  *
  5.  * @copyright  Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  6.  * @license    GNU General Public License version 2 or later; see LICENSE.txt
  7.  */
  8.  
  9. defined('_JEXEC'or die;
  10.  
  11. /**
  12.  * Joomla! Administrator Application helper class.
  13.  * Provide many supporting API functions.
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  Application
  17.  * @since       1.5
  18.  */
  19. {
  20.     /**
  21.      * Return the application option string [main component].
  22.      *
  23.      * @return  string  The component to access.
  24.      *
  25.      * @since   1.5
  26.      */
  27.     public static function findOption()
  28.     {
  29.         $app JFactory::getApplication();
  30.         $option strtolower($app->input->get('option'));
  31.  
  32.         $app->loadIdentity();
  33.         $user $app->getIdentity();
  34.  
  35.         if ($user->get('guest'|| !$user->authorise('core.login.admin'))
  36.         {
  37.             $option 'com_login';
  38.         }
  39.  
  40.         if (empty($option))
  41.         {
  42.             $option 'com_cpanel';
  43.         }
  44.  
  45.         $app->input->set('option'$option);
  46.  
  47.         return $option;
  48.     }
  49. }

Documentation generated on Tue, 19 Nov 2013 15:04:38 +0100 by phpDocumentor 1.4.3