src/SelectOther.php
public function run()
    {
        $readOnly = isset($this->options['readOnly']) && $this->options['readOnly'] == true;
        $disabled = isset($this->options['disabled'])
            && ($this->options['disabled'] == true || $this->options['disabled'] == 'disabled');

        if (!$disabled && !$readOnly) {
            $this->registerClientScript();
        }

        if ($this->hasModel()) {
            $textInput = Html::activeTextInput($this->model, $this->attribute, $this->options);
        } else {
            $textInput = Html::textInput($this->name, $this->value, $this->options);
        }

        return Html::tag(
            'div',
            $textInput,
            [
                'id' => $this->widgetId
            ]
        );
    }
public function run()
    {
        $readOnly = isset($this->options['readOnly']) && $this->options['readOnly'] == true;
        $disabled = isset($this->options['disabled'])
            && ($this->options['disabled'] == true || $this->options['disabled'] == 'disabled');

        if (!$disabled && !$readOnly) {
            $this->registerClientScript();
        }

        if ($this->hasModel()) {
            $textInput = Html::activeTextInput($this->model, $this->attribute, $this->options);
        } else {
            $textInput = Html::textInput($this->name, $this->value, $this->options);
        }

        return Html::tag(
            'div',
            $textInput,
            [
                'id' => $this->widgetId
            ]
        );
    }
Executes the widget.
@return string the result of widget execution to be outputted.