$legend); parent::__construct("", $name, $properties); } public function render() { $wrapperClass = $this->getWrapperCssClass(); if (!empty($wrapperClass)) { $existing = isset($this->attributes['class']) ? $this->attributes['class'] . ' ' : ''; $this->attributes['class'] = $existing . $wrapperClass; } $wrapperID = $this->getWrapperCssId(); if (!empty($wrapperID)) { $this->attributes['id'] = $wrapperID; } $legend = $this->attributes['legend']; $style = isset($this->attributes['fieldset_style']) ? $this->attributes['fieldset_style'] : 'border-off-title-off'; $exclude = array('legend', 'fieldset_style'); // Add border class for border-on variants $has_border = in_array($style, array('border-on-title-off', 'border-on-title-inline', 'border-on-title-outside', 'border-on-title-inside'), true); if ($has_border) { $existing = isset($this->attributes['class']) ? $this->attributes['class'] . ' ' : ''; $this->attributes['class'] = $existing . 'accua-fieldset-border'; } switch ($style) { case 'border-on-title-outside': if ($legend !== '') { echo '
', $legend, '
'; } echo '