/** * @return string */ public function open() { $attributes = $this->fieldSet->getAttributes(); $legend = $this->fieldSet->getLabel(); $tag = sprintf('<fieldset %s><legend>%s</legend>', new Attributes($attributes), $legend); return $tag; }
/** * @inheritdoc */ public function getAttributes() { return $this->element->getAttributes(); }
/** * Create fieldset attributes * * @param \Zend\Form\FieldsetInterface $fieldset * @return string */ protected function createFieldsetAttributes(FieldsetInterface $fieldset) { $markup = ''; $escape = $this->getEscapeHtmlAttrHelper(); foreach ($fieldset->getAttributes() as $key => $value) { if ($key == 'disabled') { if ($value) { $markup .= ' disabled="disabled"'; } } else { $markup .= ' ' . $key . '="' . $escape($value) . '"'; } } return $markup; }