kartik\grid\ColumnTrait::initGrouping PHP Method

initGrouping() protected method

Initializes grid grouping
protected initGrouping ( ) : void
return void
    protected function initGrouping()
    {
        if (empty($this->group)) {
            return;
        }
        $view = $this->grid->getView();
        $this->_columnKey = $this->getColumnKey();
        Html::addCssClass($this->headerOptions, 'kv-grid-group-header');
        Html::addCssClass($this->filterOptions, 'kv-grid-group-filter');
        $this->headerOptions['data-group-key'] = $this->filterOptions['data-group-key'] = $this->_columnKey;
        GridGroupAsset::register($view);
        $id = $this->grid->options['id'];
        $this->_clientScript = "kvGridGroup('{$id}');";
        $view->registerJs($this->_clientScript);
    }