public function renderToggleButton()
    {
        if ($this->toggleButton !== false) {
            $tag = ArrayHelper::remove($this->toggleButton, 'tag', 'div');
            $label = ArrayHelper::remove($this->toggleButton, 'label', Html::tag('i', '', ['class' => 'content icon']));

            Html::addCssClass($this->toggleButton, 'ui');
            Html::addCssClass($this->toggleButton, 'launch-sidebar icon');
            Html::addCssClass($this->toggleButton, 'button');
            Html::addCssClass($this->toggleButton, 'fixed');
            Html::addCssClass($this->toggleButton, 'attached');
            if ($this->position === static::POS_LEFT) {
                $position = static::POS_RIGHT;
            } else {
                $position = static::POS_LEFT;
            }
            Html::addCssClass($this->toggleButton, $position);
            $view = $this->getView();
            DosAmigosAsset::register($view);
            $view->registerJs('dosamigos.semantic.init();');
            return Html::tag($tag, $label, $this->toggleButton);
        } else {
            return null;
        }
    }
public function renderToggleButton()
    {
        if ($this->toggleButton !== false) {
            $tag = ArrayHelper::remove($this->toggleButton, 'tag', 'div');
            $label = ArrayHelper::remove($this->toggleButton, 'label', Html::tag('i', '', ['class' => 'content icon']));

            Html::addCssClass($this->toggleButton, 'ui');
            Html::addCssClass($this->toggleButton, 'launch-sidebar icon');
            Html::addCssClass($this->toggleButton, 'button');
            Html::addCssClass($this->toggleButton, 'fixed');
            Html::addCssClass($this->toggleButton, 'attached');
            if ($this->position === static::POS_LEFT) {
                $position = static::POS_RIGHT;
            } else {
                $position = static::POS_LEFT;
            }
            Html::addCssClass($this->toggleButton, $position);
            $view = $this->getView();
            DosAmigosAsset::register($view);
            $view->registerJs('dosamigos.semantic.init();');
            return Html::tag($tag, $label, $this->toggleButton);
        } else {
            return null;
        }
    }
public function renderToggleButton ( ) { if ( $ this -> toggleButton !== false ) { $ tag = ArrayHelper :: remove ( $ this -> toggleButton , 'tag' , 'div' ) ; $ label = ArrayHelper :: remove ( $ this -> toggleButton , 'label' , Html :: tag ( 'i' , '' , [ 'class' => 'content icon' ] ) ) ; Html :: addCssClass ( $ this -> toggleButton , 'ui' ) ; Html :: addCssClass ( $ this -> toggleButton , 'launch-sidebar icon' ) ; Html :: addCssClass ( $ this -> toggleButton , 'button' ) ; Html :: addCssClass ( $ this -> toggleButton , 'fixed' ) ; Html :: addCssClass ( $ this -> toggleButton , 'attached' ) ; if ( $ this -> position === static :: POS_LEFT ) { $ position = static :: POS_RIGHT ; } else { $ position = static :: POS_LEFT ; } Html :: addCssClass ( $ this -> toggleButton , $ position ) ; $ view = $ this -> getView ( ) ; DosAmigosAsset :: register ( $ view ) ; $ view -> registerJs ( 'dosamigos.semantic.init();' ) ; return Html :: tag ( $ tag , $ label , $ this -> toggleButton ) ; } else { return null ; } }
Generates the toggle button. The one that 'on-click', shows the sidebar.

@return null|string the generated toggle button
Generates the toggle button . The one that on - click shows the sidebar .