protected function resolveNameID()
    {
        if ($this->name !== null) {
            $name = $this->name;
            $id   = $this->name;
        } elseif ($this->hasModel()) {
            $name = Html::getInputName($this->model, $this->attribute);
            $id   = Html::getInputId($this->model, $this->attribute);
        } else {
            throw new \yii\base\Exception('Class must specify "model" and "attribute" or "name" property values.');
        }
        return [$name, $id];
    }