protected function getInstance(string $className)
    {
        $config = [
            'class'   => $className,
            'name'    => $this->name,
            'form'    => $this->form,
            'model'   => $this->model,
            'label'   => $this->label,
            'data'    => $this->data,
            'options' => $this->options,
            'preset'  => $this->preset,
        ];

        if ($this->language !== null) {
            $config['language'] = $this->language;
        }

        return \Yii::createObject($config);
    }
protected function getInstance(string $className)
    {
        $config = [
            'class'   => $className,
            'name'    => $this->name,
            'form'    => $this->form,
            'model'   => $this->model,
            'label'   => $this->label,
            'data'    => $this->data,
            'options' => $this->options,
            'preset'  => $this->preset,
        ];

        if ($this->language !== null) {
            $config['language'] = $this->language;
        }

        return \Yii::createObject($config);
    }
protected function getInstance ( string $ className ) { $ config = [ 'class' => $ className , 'name' => $ this -> name , 'form' => $ this -> form , 'model' => $ this -> model , 'label' => $ this -> label , 'data' => $ this -> data , 'options' => $ this -> options , 'preset' => $ this -> preset , ] ; if ( $ this -> language !== null ) { $ config [ 'language' ] = $ this -> language ; } return \ Yii :: createObject ( $ config ) ; }
Creates an object from the class of the selected field widget.

@return object
Creates an object from the class of the selected field widget .