* @link https://www.tassos.gr * @copyright Copyright © 2024 Tassos All Rights Reserved * @license GNU GPLv3 or later */ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Form\FormField; use Joomla\CMS\Form\Form; class JFormFieldTFBorderControl extends FormField { protected function getInput() { // Control Group Class $control_group_class = (string) $this->element['control_group_class']; // Defaults $default_style = isset($this->element['default_style']) ? (string) $this->element['default_style'] : ''; $default_width = isset($this->element['default_width']) ? (string) $this->element['default_width'] : 0; $default_color = isset($this->element['default_color']) ? (string) $this->element['default_color'] : ''; // Hides the inner control labels $hide_labels = (bool) $this->element['hide_labels']; $hiddenLabel = $hide_labels ? 'hiddenLabel="true"' : ''; // Prefix and suffix for the fieldset $prefix = $suffix = ''; // Whether to display the fields inline $inline = (bool) $this->element['inline']; if ($inline) { $prefix = ''; $suffix = ''; } $form_source = new SimpleXMLElement('
' . $prefix . ' ' . $suffix . '
'); $control = $this->name; $formname = 'border.' . str_replace(['jform[', '[', ']'], ['', '.', ''], $control); $form = Form::getInstance($formname, $form_source->asXML(), ['control' => $control]); $form->bind($this->value); return $form->renderFieldset('border', [ 'class' => $control_group_class ]); } }