[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/plugins/system/stats/layouts/field/ -> data.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Plugin
   5   * @subpackage  System.stats
   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  use Joomla\CMS\Language\Text;
  15  
  16  /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
  17  $wa = Factory::getApplication()->getDocument()->getWebAssetManager();
  18  $wa->registerAndUseScript('plg_system_stats.stats', 'plg_system_stats/stats.js', [], ['defer' => true], ['core']);
  19  
  20  extract($displayData);
  21  
  22  /**
  23   * Layout variables
  24   * -----------------
  25   * @var   string   $autocomplete    Autocomplete attribute for the field.
  26   * @var   boolean  $autofocus       Is autofocus enabled?
  27   * @var   string   $class           Classes for the input.
  28   * @var   string   $description     Description of the field.
  29   * @var   boolean  $disabled        Is this field disabled?
  30   * @var   string   $group           Group the field belongs to. <fields> section in form XML.
  31   * @var   boolean  $hidden          Is this field hidden in the form?
  32   * @var   string   $hint            Placeholder for the field.
  33   * @var   string   $id              DOM id of the field.
  34   * @var   string   $label           Label of the field.
  35   * @var   string   $labelclass      Classes to apply to the label.
  36   * @var   boolean  $multiple        Does this field support multiple values?
  37   * @var   string   $name            Name of the input field.
  38   * @var   string   $onchange        Onchange attribute for the field.
  39   * @var   string   $onclick         Onclick attribute for the field.
  40   * @var   string   $pattern         Pattern (Reg Ex) of value of the form field.
  41   * @var   boolean  $readonly        Is this field read only?
  42   * @var   boolean  $repeat          Allows extensions to duplicate elements.
  43   * @var   boolean  $required        Is this field required?
  44   * @var   integer  $size            Size attribute of the input.
  45   * @var   boolean  $spellcheck      Spellcheck state for the form field.
  46   * @var   string   $validate        Validation rules to apply.
  47   * @var   string   $value           Value attribute of the field.
  48   * @var   array    $options         Options available for this field.
  49   * @var   array    $statsData       Statistics that will be sent to the stats server
  50   */
  51  ?>
  52  <?php if (count($statsData)) : ?>
  53      <a href="#" id="js-pstats-data-details-toggler"><?php echo Text::_('PLG_SYSTEM_STATS_MSG_WHAT_DATA_WILL_BE_SENT'); ?></a>
  54      <?php echo $field->render('stats', compact('statsData')); ?>
  55  <?php endif; ?>


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