[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

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

   1  <?php
   2  
   3  /**
   4   * Joomla! Content Management System
   5   *
   6   * @copyright  (C) 2013 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\Factory;
  13  use Joomla\CMS\Form\Form;
  14  
  15  // phpcs:disable PSR1.Files.SideEffects
  16  \defined('JPATH_PLATFORM') or die;
  17  // phpcs:enable PSR1.Files.SideEffects
  18  
  19  /**
  20   * Registration Date Range field.
  21   *
  22   * @since  3.2
  23   */
  24  class RegistrationdaterangeField extends PredefinedlistField
  25  {
  26      /**
  27       * The form field type.
  28       *
  29       * @var     string
  30       * @since   3.2
  31       */
  32      protected $type = 'RegistrationDateRange';
  33  
  34      /**
  35       * Available options
  36       *
  37       * @var  array
  38       * @since  3.2
  39       */
  40      protected $predefinedOptions = array(
  41          'today'       => 'COM_USERS_OPTION_RANGE_TODAY',
  42          'past_week'   => 'COM_USERS_OPTION_RANGE_PAST_WEEK',
  43          'past_1month' => 'COM_USERS_OPTION_RANGE_PAST_1MONTH',
  44          'past_3month' => 'COM_USERS_OPTION_RANGE_PAST_3MONTH',
  45          'past_6month' => 'COM_USERS_OPTION_RANGE_PAST_6MONTH',
  46          'past_year'   => 'COM_USERS_OPTION_RANGE_PAST_YEAR',
  47          'post_year'   => 'COM_USERS_OPTION_RANGE_POST_YEAR',
  48      );
  49  
  50      /**
  51       * Method to instantiate the form field object.
  52       *
  53       * @param   Form  $form  The form to attach to the form field object.
  54       *
  55       * @since   1.7.0
  56       */
  57      public function __construct($form = null)
  58      {
  59          parent::__construct($form);
  60  
  61          // Load the required language
  62          $lang = Factory::getLanguage();
  63          $lang->load('com_users', JPATH_ADMINISTRATOR);
  64      }
  65  }


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