Exemple #1
0
 /**
  * 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();
 }
Exemple #2
0
 /**
  * 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();
 }