[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/layouts/joomla/form/field/subform/repeatable-table/ -> section-byfieldsets.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\Form\Form;
  14  use Joomla\CMS\Language\Text;
  15  
  16  extract($displayData);
  17  
  18  /**
  19   * Layout variables
  20   * -----------------
  21   * @var   Form    $form       The form instance for render the section
  22   * @var   string  $basegroup  The base group name
  23   * @var   string  $group      Current group name
  24   * @var   array   $buttons    Array of the buttons that will be rendered
  25   */
  26  ?>
  27  
  28  <tr class="subform-repeatable-group" data-base-name="<?php echo $basegroup; ?>" data-group="<?php echo $group; ?>">
  29      <?php foreach ($form->getFieldsets() as $fieldset) : ?>
  30      <td class="<?php if (!empty($fieldset->class)) {
  31          echo $fieldset->class;
  32                 } ?>">
  33          <?php foreach ($form->getFieldset($fieldset->name) as $field) : ?>
  34              <?php echo $field->renderField(); ?>
  35          <?php endforeach; ?>
  36      </td>
  37      <?php endforeach; ?>
  38      <?php if (!empty($buttons)) : ?>
  39      <td>
  40          <div class="btn-group">
  41              <?php if (!empty($buttons['add'])) : ?>
  42                  <button type="button" class="group-add btn btn-sm btn-success" aria-label="<?php echo Text::_('JGLOBAL_FIELD_ADD'); ?>">
  43                      <span class="icon-plus" aria-hidden="true"></span>
  44                  </button>
  45              <?php endif; ?>
  46              <?php if (!empty($buttons['remove'])) : ?>
  47                  <button type="button" class="group-remove btn btn-sm btn-danger" aria-label="<?php echo Text::_('JGLOBAL_FIELD_REMOVE'); ?>">
  48                      <span class="icon-minus" aria-hidden="true"></span>
  49                  </button>
  50              <?php endif; ?>
  51              <?php if (!empty($buttons['move'])) : ?>
  52                  <button type="button" class="group-move btn btn-sm btn-primary" aria-label="<?php echo Text::_('JGLOBAL_FIELD_MOVE'); ?>">
  53                      <span class="icon-arrows-alt" aria-hidden="true"></span>
  54                  </button>
  55              <?php endif; ?>
  56          </div>
  57      </td>
  58      <?php endif; ?>
  59  </tr>


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