[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Form/Field/ -> ContentlanguageField.php (source)

   1  <?php
   2  
   3  /**
   4   * Joomla! Content Management System
   5   *
   6   * @copyright  (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
   7   * @license    GNU General Public License version 2 or later; see LICENSE.txt
   8   */
   9  
  10  namespace Joomla\CMS\Form\Field;
  11  
  12  use Joomla\CMS\HTML\HTMLHelper;
  13  
  14  // phpcs:disable PSR1.Files.SideEffects
  15  \defined('JPATH_PLATFORM') or die;
  16  // phpcs:enable PSR1.Files.SideEffects
  17  
  18  /**
  19   * Provides a list of content languages
  20   *
  21   * @see    \Joomla\CMS\Form\Field\LanguageField for a select list of application languages.
  22   * @since  1.6
  23   */
  24  class ContentlanguageField extends ListField
  25  {
  26      /**
  27       * The form field type.
  28       *
  29       * @var    string
  30       * @since  1.6
  31       */
  32      public $type = 'ContentLanguage';
  33  
  34      /**
  35       * Method to get the field options for content languages.
  36       *
  37       * @return  array  The options the field is going to show.
  38       *
  39       * @since   1.6
  40       */
  41      protected function getOptions()
  42      {
  43          return array_merge(parent::getOptions(), HTMLHelper::_('contentlanguage.existing'));
  44      }
  45  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer