Beispiel #1
0
 /**
  * @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;
 }
Beispiel #2
0
 /**
  * @inheritdoc
  */
 public function getAttributes()
 {
     return $this->element->getAttributes();
 }
Beispiel #3
0
 /**
  * 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;
 }