Exemplo n.º 1
0
 /**
  * Render list box tag
  *
  * @access public
  *
  * @param IFormModel $model model
  * @param string $property model property
  * @param array $options attributes array
  *
  * @return string
  */
 public function listBoxField(IFormModel $model, $property, array $options = [])
 {
     $element = $this->getField($model, $property);
     $options['id'] = $element['id'];
     $options['selected'] = $element['value'];
     if (empty($options['size'])) {
         $options['size'] = 3;
     }
     return Html::listBox($element['name'], $this->getBlock('elements', $options), $options);
 }