Author: Alexander Kochetov (creocoder@gmail.com)
Inheritance: extends yii\widgets\InputWidget
 /**
  * @inheritdoc
  */
 public function run()
 {
     if ($this->hasModel()) {
         echo Html::activeDropDownList($this->model, $this->attribute, $this->items, $this->options);
     } else {
         echo Html::dropDownList($this->name, $this->value, $this->items, $this->options);
     }
     parent::run();
 }
示例#2
0
 /**
  * @inheritdoc
  */
 public function run()
 {
     if ($this->hasModel()) {
         echo Html::activeTextInput($this->model, $this->attribute, $this->options);
     } else {
         echo Html::textInput($this->name, $this->value, $this->options);
     }
     parent::run();
 }