[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/layouts/joomla/form/field/ -> moduleorder.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  Layout
   6   *
   7   * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
   8   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   9   */
  10  
  11  defined('_JEXEC') or die;
  12  
  13  use Joomla\CMS\Factory;
  14  
  15  extract($displayData);
  16  
  17  /**
  18   * Layout variables
  19   * -----------------
  20   * @var   string   $autocomplete    Autocomplete attribute for the field.
  21   * @var   boolean  $autofocus       Is autofocus enabled?
  22   * @var   string   $class           Classes for the input.
  23   * @var   string   $description     Description of the field.
  24   * @var   boolean  $disabled        Is this field disabled?
  25   * @var   string   $group           Group the field belongs to. <fields> section in form XML.
  26   * @var   boolean  $hidden          Is this field hidden in the form?
  27   * @var   string   $hint            Placeholder for the field.
  28   * @var   string   $id              DOM id of the field.
  29   * @var   string   $label           Label of the field.
  30   * @var   string   $labelclass      Classes to apply to the label.
  31   * @var   boolean  $multiple        Does this field support multiple values?
  32   * @var   string   $name            Name of the input field.
  33   * @var   string   $onchange        Onchange attribute for the field.
  34   * @var   string   $onclick         Onclick attribute for the field.
  35   * @var   string   $pattern         Pattern (Reg Ex) of value of the form field.
  36   * @var   boolean  $readonly        Is this field read only?
  37   * @var   boolean  $repeat          Allows extensions to duplicate elements.
  38   * @var   boolean  $required        Is this field required?
  39   * @var   integer  $size            Size attribute of the input.
  40   * @var   boolean  $spellcheck      Spellcheck state for the form field.
  41   * @var   string   $validate        Validation rules to apply.
  42   * @var   string   $value           Value attribute of the field.
  43   * @var   array    $checkedOptions  Options that will be set as checked.
  44   * @var   boolean  $hasValue        Has this field a value assigned?
  45   * @var   array    $options         Options available for this field.
  46   * @var   array    $inputType       Options available for this field.
  47   * @var   string   $accept          File types that are accepted.
  48   * @var   string   $dataAttribute   Miscellaneous data attributes preprocessed for HTML output
  49   * @var   array    $dataAttributes  Miscellaneous data attributes for eg, data-*.
  50   */
  51  
  52  // Initialize some field attributes.
  53  $attributes['dataid'] = 'data-id="' . $id . '"';
  54  $attributes['data-url'] = 'data-url="index.php?option=com_modules&task=module.orderPosition&' . $token . '"';
  55  $attributes['data-element'] = 'data-element="parent_' . $id . '"';
  56  $attributes['data-ordering'] = 'data-ordering="' . $ordering . '"';
  57  $attributes['data-position-element'] = 'data-position-element="' . $element . '"';
  58  $attributes['data-client-id'] = 'data-client-id="' . $clientId . '"';
  59  $attributes['data-name'] = 'data-name="' . $name . '"';
  60  $attributes['data-module-id'] = 'data-module-id="' . $moduleId . '"';
  61  
  62  if ($disabled) {
  63      $attributes['disabled'] =  'disabled';
  64  }
  65  
  66  if ($class) {
  67      $attributes['class'] = 'class="' . $class . '"';
  68  }
  69  
  70  if ($size) {
  71      $attributes['size'] = 'size="' . $size . '"';
  72  }
  73  
  74  if ($onchange) {
  75      $attributes['onchange'] = 'onchange="' . $onchange . '"';
  76  }
  77  
  78  if ($dataAttribute) {
  79      $attributes['dataAttribute'] = $dataAttribute;
  80  }
  81  
  82  Factory::getDocument()->getWebAssetManager()
  83      ->useScript('webcomponent.field-module-order');
  84  
  85  ?>
  86  <joomla-field-module-order <?php echo implode(' ', $attributes); ?>></joomla-field-module-order>


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