/** * Render the element. * * @api * * @return string */ public function render() { parent::renderPrepare(); foreach ($this->options as $key => $value) { $this->innerHtml .= (new SelectOption($value, $key, $key == $this->selectedValue))->render(); } return parent::render(); }
/** * Render the element. * * @api * * @return string */ public function render() { parent::renderPrepare(); foreach ($this->options as $key => $value) { $this->innerHtml .= (new OptionInput($this->attributes['name'], $this->attributes['name'] . '_' . $key, $key, $key == $this->selectedValue))->render(); $this->innerHtml .= ' ' . (new Label($this->attributes['name'] . '_' . $key, $value, false))->render() . ' '; } return parent::render(); }