private function renderButton()
    {
        $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,
        ]);

        if($this->cookie($this->cookie['name'])) {
            Html::addCssClass($this->options, 'active');
        }

        echo Button::widget([
            'label' => $this->encodeLabel ? Html::encode($this->label) : $this->label,
            'encodeLabel' => $this->encodeLabel,
            'options' => ArrayHelper::merge(['data-toggle' => 'button'], $this->options),
        ]);
    }
private function renderButton()
    {
        $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,
        ]);

        if($this->cookie($this->cookie['name'])) {
            Html::addCssClass($this->options, 'active');
        }

        echo Button::widget([
            'label' => $this->encodeLabel ? Html::encode($this->label) : $this->label,
            'encodeLabel' => $this->encodeLabel,
            'options' => ArrayHelper::merge(['data-toggle' => 'button'], $this->options),
        ]);
    }
private function renderButton ( ) { $ 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 , ] ) ; if ( $ this -> cookie ( $ this -> cookie [ 'name' ] ) ) { Html :: addCssClass ( $ this -> options , 'active' ) ; } echo Button :: widget ( [ 'label' => $ this -> encodeLabel ? Html :: encode ( $ this -> label ) : $ this -> label , 'encodeLabel' => $ this -> encodeLabel , 'options' => ArrayHelper :: merge ( [ 'data-toggle' => 'button' ] , $ this -> options ) , ] ) ; }
Renders the toggle button.
Renders the toggle button .