/** * @inheritdoc */ public function run() { $this->registerClientScript(); if ($this->hasModel()) { echo Html::activeInput($this->type, $this->model, $this->attribute, $this->options); } else { echo Html::input($this->type, $this->name, $this->value, $this->options); } }