protected function renderWidget($type, $name, $value, $options)
    {
        unset($options['tabindex']);

        $model = $this->getModel();
        if ($model instanceof Model) {
            $widgetOptions = [
                'model'     => $model,
                'attribute' => $this->name,
                'value'     => $value,
                'options'   => [
                    'id'        => $this->normalize($name),
                    'name'      => $name,
                    'tabindex'  => self::TABINDEX,
                    'value'     => $value
                ]
            ];
        } else {
            $widgetOptions = [
                'name'      => $name,
                'value'     => $value,
                'options'   => [
                    'id'        => $this->normalize($name),
                    'name'      => $name,
                    'tabindex'  => self::TABINDEX,
                    'value'     => $value
                ]
            ];
        }

        $options = ArrayHelper::merge($options, $widgetOptions);

        return $type::widget($options);
    }
protected function renderWidget($type, $name, $value, $options)
    {
        unset($options['tabindex']);

        $model = $this->getModel();
        if ($model instanceof Model) {
            $widgetOptions = [
                'model'     => $model,
                'attribute' => $this->name,
                'value'     => $value,
                'options'   => [
                    'id'        => $this->normalize($name),
                    'name'      => $name,
                    'tabindex'  => self::TABINDEX,
                    'value'     => $value
                ]
            ];
        } else {
            $widgetOptions = [
                'name'      => $name,
                'value'     => $value,
                'options'   => [
                    'id'        => $this->normalize($name),
                    'name'      => $name,
                    'tabindex'  => self::TABINDEX,
                    'value'     => $value
                ]
            ];
        }

        $options = ArrayHelper::merge($options, $widgetOptions);

        return $type::widget($options);
    }
protected function renderWidget ( $ type , $ name , $ value , $ options ) { unset ( $ options [ 'tabindex' ] ) ; $ model = $ this -> getModel ( ) ; if ( $ model instanceof Model ) { $ widgetOptions = [ 'model' => $ model , 'attribute' => $ this -> name , 'value' => $ value , 'options' => [ 'id' => $ this -> normalize ( $ name ) , 'name' => $ name , 'tabindex' => self :: TABINDEX , 'value' => $ value ] ] ; } else { $ widgetOptions = [ 'name' => $ name , 'value' => $ value , 'options' => [ 'id' => $ this -> normalize ( $ name ) , 'name' => $ name , 'tabindex' => self :: TABINDEX , 'value' => $ value ] ] ; } $ options = ArrayHelper :: merge ( $ options , $ widgetOptions ) ; return $ type :: widget ( $ options ) ; }
Renders a widget.

@param string $type
@param string $name the name of input
@param mixed $value the value of input
@param array $options the HTMl options of input
@return mixed
Renders a widget .