Source for file languages.php

Documentation is available at languages.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_languages
  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.  * Utility class working with languages
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_languages
  17.  * @since       1.6
  18.  */
  19. abstract class JHtmlLanguages
  20. {
  21.     /**
  22.      * Method to generate an information about the default language
  23.      *
  24.      * @param   boolean    $published is the language the default?
  25.      *
  26.      * @return  string    html code
  27.      */
  28.     public static function published($published)
  29.     {
  30.         if ($published)
  31.         {
  32.             return JHtml::_('image''menu/icon-16-default.png'JText::_('COM_LANGUAGES_HEADING_DEFAULT')nulltrue);
  33.         }
  34.         else
  35.         {
  36.             return '&#160;';
  37.         }
  38.     }
  39.  
  40.     /**
  41.      * Method to generate an input radio button
  42.      *
  43.      * @param   integer  $rowNum the row number
  44.      * @param   string    language tag
  45.      *
  46.      * @return  string    html code
  47.      */
  48.     public static function id($rowNum$language)
  49.     {
  50.         return '<input type="radio" id="cb' $rowNum '" name="cid" value="' htmlspecialchars($language'" onclick="Joomla.isChecked(this.checked);" title="' ($rowNum 1'"/>';
  51.     }
  52.  
  53.     public static function clients()
  54.     {
  55.         return array(
  56.             JHtml::_('select.option'0JText::_('JSITE')),
  57.             JHtml::_('select.option'1JText::_('JADMINISTRATOR'))
  58.         );
  59.     }
  60.  
  61.     /**
  62.      * Returns an array of published state filter options.
  63.      *
  64.      * @return  string      The HTML code for the select tag
  65.      * @since   1.6
  66.      */
  67.     public static function publishedOptions()
  68.     {
  69.         // Build the active state filter options.
  70.         $options    array();
  71.         $options[]    JHtml::_('select.option''1''JPUBLISHED');
  72.         $options[]    JHtml::_('select.option''0''JUNPUBLISHED');
  73.         $options[]    JHtml::_('select.option''-2''JTRASHED');
  74.         $options[]    JHtml::_('select.option''*''JALL');
  75.  
  76.         return $options;
  77.     }
  78.  
  79. }

Documentation generated on Tue, 19 Nov 2013 15:06:37 +0100 by phpDocumentor 1.4.3