private function renderButtonGroup()
    {
        $this->params = Json::encode([
            'btnName' => $this->options['id'],
            'cookieName' => $this->cookie['name'],
            'cookieValue' => addslashes($this->getHashedCookieValue($this->cookie['value'])),
            'cookieOptions' => isset($this->cookie['options']) ? $this->cookie['options'] : null,
            'toggleClass' => isset($this->toggleClass) ? $this->toggleClass : null
        ]);

        if($this->cookie($this->cookie['name'])) {
            $isActive = true;
        } else {
            $isActive = false;
        }

        echo ButtonGroup::widget([
            'id' => $this->options['id'],
            'buttons' => [
                [
                    'label' => $this->encodeLabel ? Html::encode($this->label[0]) : $this->label[0],
                    'options' => [
                        'class' => 'btn ' . ($isActive ? $this->toggleClass : 'btn-default') . ' ' . $this->options['class'] . ($isActive ? ' active' : '')
                    ]
                ],
                [
                    'label' => $this->encodeLabel ? Html::encode($this->label[1]) : $this->label[1],
                    'options' => [
                        'class' => 'btn ' . ($isActive ? 'btn-default' : $this->toggleClass) . ' '  . $this->options['class'] . ($isActive ? ' active' : '')
                    ]
                ],
            ]
        ]);
    }