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