skeeks\cms\widgets\formInputs\comboText\ComboTextInputWidget::run PHP Method

run() public method

public run ( )
    public function run()
    {
        $this->options = ArrayHelper::merge($this->defaultOptions, $this->options);
        if ($this->hasModel()) {
            if (!array_key_exists('id', $this->options)) {
                $this->clientOptions['inputId'] = Html::getInputId($model, $attribute);
            } else {
                $this->clientOptions['inputId'] = $this->options['id'];
            }
            $textarea = Html::activeTextarea($this->model, $this->attribute, $this->options);
        } else {
            //TODO: реализовать для работы без модели
            echo Html::textarea($this->name, $this->value, $this->options);
            return;
        }
        $this->registerPlugin();
        echo $this->render('combo-text', ['widget' => $this, 'textarea' => $textarea]);
    }