[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/layouts/joomla/toolbar/ -> popup.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  Layout
   6   *
   7   * @copyright   (C) 2013 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\Utilities\ArrayHelper;
  15  
  16  extract($displayData, EXTR_OVERWRITE);
  17  
  18  /**
  19   * Layout variables
  20   * -----------------
  21   * @var   int     $id
  22   * @var   string  $name
  23   * @var   string  $doTask
  24   * @var   string  $class
  25   * @var   string  $text
  26   * @var   string  $btnClass
  27   * @var   string  $tagName
  28   * @var   bool    $listCheck
  29   * @var   string  $htmlAttributes
  30   */
  31  
  32  Factory::getDocument()->getWebAssetManager()
  33      ->useScript('core')
  34      ->useScript('webcomponent.toolbar-button');
  35  
  36  $tagName = $tagName ?? 'button';
  37  
  38  $modalAttrs['data-bs-toggle'] = 'modal';
  39  $modalAttrs['data-bs-target'] = '#' . $selector;
  40  
  41  $idAttr   = !empty($id)        ? ' id="' . $id . '"' : '';
  42  $listAttr = !empty($listCheck) ? ' list-selection' : '';
  43  
  44  ?>
  45  <joomla-toolbar-button <?php echo $idAttr . $listAttr; ?>>
  46  <<?php echo $tagName; ?>
  47      value="<?php echo $doTask; ?>"
  48      class="<?php echo $btnClass; ?>"
  49      <?php echo $htmlAttributes; ?>
  50      <?php echo ArrayHelper::toString($modalAttrs); ?>
  51  >
  52      <span class="<?php echo $class; ?>" aria-hidden="true"></span>
  53      <?php echo $text; ?>
  54  </<?php echo $tagName; ?>>
  55  </joomla-toolbar-button>


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