* @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Layout\LayoutHelper; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; // No direct access to this file defined('JPATH_BASE') or die; use Joomla\CMS\Form\Form; extract($displayData); /** * Layout variables * ----------------- * @var Form $tmpl The empty form for the template. * @var array $forms Array of Form instances for rendering the rows. * @var bool $multiple The multiple state for the form field. * @var int $min Count of minimum repeating in multiple mode. * @var int $max Count of maximum repeating in multiple mode. * @var string $name Name of the input field. * @var string $fieldname The field name. * @var string $fieldId The field ID. * @var string $control The forms control. * @var string $label The field label. * @var string $description The field description. * @var string $class Classes for the container. * @var array $buttons Array of the buttons that will be rendered. * @var bool $groupByFieldset Whether to group the subform fields by fieldset. */ $tmpl = $displayData['tmpl'] ?? null; $forms = $displayData['forms'] ?? []; $multiple = (bool) ($displayData['multiple'] ?? false); $min = (int) ($displayData['min'] ?? 0); $max = (int) ($displayData['max'] ?? 0); $name = (string) ($displayData['name'] ?? ''); $fieldname = (string) ($displayData['fieldname'] ?? ''); $fieldId = (string) ($displayData['fieldId'] ?? ''); $control = (string) ($displayData['control'] ?? ''); $label = (string) ($displayData['label'] ?? ''); $description = (string) ($displayData['description'] ?? ''); $class = trim((string) ($displayData['class'] ?? '')); $buttons = $displayData['buttons'] ?? []; $groupByFieldset = (bool) ($displayData['groupByFieldset'] ?? false); // Kept for backward compatibility with incoming layout data. unset($control, $groupByFieldset); if ($multiple) { Factory::getApplication() ->getDocument() ->getWebAssetManager() ->useScript('webcomponent.field-subform'); } $showAdd = !empty($buttons['add']); $showMove = !empty($buttons['move']); $wrapperClass = $class !== '' ? ' ' . $class : ''; $sublayout = 'sectionjcbjsix'; $describedById = $fieldId !== '' ? $fieldId . '-desc' : ''; $labelId = $fieldId !== '' ? $fieldId . '-lbl' : ''; $subformClassName = 'subform-repeatable subform-layout d-block' . $wrapperClass; ?>
>
$form) : ?> $form, 'basegroup' => $fieldname, 'group' => $fieldname . $k, 'buttons' => $buttons,]); ?>