Source for file helper.php

Documentation is available at helper.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  mod_login
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC'or die;
  11.  
  12. /**
  13.  * Helper for mod_login
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  mod_login
  17.  * @since       1.6
  18.  */
  19. abstract class ModLoginHelper
  20. {
  21.     /**
  22.      * Get an HTML select list of the available languages.
  23.      *
  24.      * @return  string 
  25.      */
  26.     public static function getLanguageList()
  27.     {
  28.         $languages JLanguageHelper::createLanguageList(nullJPATH_ADMINISTRATORfalsetrue);
  29.  
  30.         if (count($languages<= 1)
  31.         {
  32.             return '';
  33.         }
  34.  
  35.         array_unshift($languagesJHtml::_('select.option'''JText::_('JDEFAULTLANGUAGE')));
  36.  
  37.         return JHtml::_('select.genericlist'$languages'lang'' class="inputbox advancedSelect"''value''text'null);
  38.     }
  39.  
  40.     /**
  41.      * Get the redirect URI after login.
  42.      *
  43.      * @return  string 
  44.      */
  45.     public static function getReturnURI()
  46.     {
  47.         $uri    JUri::getInstance();
  48.         $return 'index.php' $uri->toString(array('query'));
  49.  
  50.         if ($return != 'index.php?option=com_login')
  51.         {
  52.             return base64_encode($return);
  53.         }
  54.         else
  55.         {
  56.             return base64_encode('index.php');
  57.         }
  58.     }
  59.  
  60.     public static function getTwoFactorMethods()
  61.     {
  62.         require_once JPATH_ADMINISTRATOR '/components/com_users/helpers/users.php';
  63.         return UsersHelper::getTwoFactorMethods();
  64.     }
  65. }

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