예제 #1
0
파일: FieldSet.php 프로젝트: hanif/stokq
 /**
  * @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;
 }
예제 #2
0
 /**
  * @inheritdoc
  */
 public function getAttributes()
 {
     return $this->element->getAttributes();
 }
예제 #3
0
파일: Form.php 프로젝트: gridguyz/zork
 /**
  * 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;
 }