$value) { if ($value instanceof Closure) { $info['legendAttribs'][$name] = $value(); } } } return $info; } public function fieldset($name, $content, $attribs = null) { $info = $this->_getInfo($name, $content, $attribs); $legendAttribs = []; $escape = $legendWrapperTag = null; extract($info); // get legend $legend = ''; if (isset($attribs['legend'])) { $legendString = trim($attribs['legend']); if (!empty($legendString)) { $legend = (($escape) ? $this->view->escape($legendString) : $legendString); if (array_key_exists('class', $legendAttribs) && Qs\Html::hasClass($legendAttribs['class'], 'required')) { $legend .= ' ' . Qs\Html::renderRequired(); } if ($legendWrapperTag) { $legend = Qs\Html::renderContainer($legendWrapperTag, $legend); } $legend = Qs\Html::renderContainer('legend', $legend, $legendAttribs) . PHP_EOL; } unset($attribs['legend']); } // get id if (!empty($id)) { $id = ' id="' . $this->view->escape($id) . '"'; } else { $id = ''; } // render fieldset $xhtml = '
'; return $xhtml; } }