/** * @return string */ public function render() { $html = '<button ' . Html::renderAttributes($this->getAttributes()) . ' >'; $html .= $this->getText() ?: 'Button'; $html .= '</button>'; return $html; }
/** * @return string */ public function renderStart() { $hidden = new Element\Input(); $hidden->setType('hidden'); $hidden->addAttributes(['name' => $this->getUid()]); $hidden->setValue(1); # get default attribute $method = $this->getMethod(); $this->setAttribute('method', $method); $html = '<form ' . Element\Html::renderAttributes($this->getAttributes()) . '>'; $html .= $hidden->render(); # render hidden element foreach ($this->getElements() as $element) { if ($element instanceof Element\Input and $element->getType() === 'hidden') { $html .= $element->render(); } } return $html; }
/** * @return string */ public function render() { return '<textarea ' . Html::renderAttributes($this->getAttributes()) . '>' . $this->getValue() . '</textarea>'; }