ui = $ui; $this->label = $label; $this->content = $content; $this->labelFor = $labelFor; $this->add( $this->label ); $this->add( $this->content ); } public function renderFieldset() { $label = $this->ui->makeElement( 'legend', $this->label ); $content = $this->ui->makeCollection( array($label, $this->content) ); $out = $this->ui->makeElement( 'fieldset', $content ) ; return $out; } public function render() { $label = $this->ui->makeElement('label', $this->label) // ->addAttr('class', 'hc-fs2') ->addAttr('class', 'hc-bold') ; if( (null !== $this->labelFor) && strlen($this->labelFor) ){ $label ->addAttr('for', $this->labelFor ) ; } $out = $this->ui->makeList( array($label, $this->content) ) ->gutter(1) ; return $out; } }