src/Contao/View/Contao2BackendView/ActionHandler/AbstractListShowAllHandler.php
private function addGroupHeader(
        EnvironmentInterface $environment,
        array $grouping,
        ModelInterface $model,
        &$groupClass,
        &$eoCount,
        &$remoteCur = null
    ) {
        if ($grouping && GroupAndSortingInformationInterface::GROUP_NONE !== $grouping['mode']) {
            $remoteNew = $this->renderGroupHeader(
                $grouping['property'],
                $model,
                $grouping['mode'],
                $grouping['length'],
                $environment
            );

            $model->setMeta(
                $model::GROUP_VALUE,
                [
                    'class' => $groupClass,
                    'value' => $remoteNew
                ]
            );
            // Add the group header if it differs from the last header.
            if (($remoteCur !== $remoteNew) || (null === $remoteCur)) {
                $eoCount    = -1;
                $groupClass = 'tl_folder_list';
                $remoteCur  = $remoteNew;
            }
        }
    }
private function addGroupHeader(
        EnvironmentInterface $environment,
        array $grouping,
        ModelInterface $model,
        &$groupClass,
        &$eoCount,
        &$remoteCur = null
    ) {
        if ($grouping && GroupAndSortingInformationInterface::GROUP_NONE !== $grouping['mode']) {
            $remoteNew = $this->renderGroupHeader(
                $grouping['property'],
                $model,
                $grouping['mode'],
                $grouping['length'],
                $environment
            );

            $model->setMeta(
                $model::GROUP_VALUE,
                [
                    'class' => $groupClass,
                    'value' => $remoteNew
                ]
            );
            // Add the group header if it differs from the last header.
            if (($remoteCur !== $remoteNew) || (null === $remoteCur)) {
                $eoCount    = -1;
                $groupClass = 'tl_folder_list';
                $remoteCur  = $remoteNew;
            }
        }
    }
private function addGroupHeader ( EnvironmentInterface $ environment , array $ grouping , ModelInterface $ model , & $ groupClass , & $ eoCount , & $ remoteCur = null ) { if ( $ grouping && GroupAndSortingInformationInterface :: GROUP_NONE !== $ grouping [ 'mode' ] ) { $ remoteNew = $ this -> renderGroupHeader ( $ grouping [ 'property' ] , $ model , $ grouping [ 'mode' ] , $ grouping [ 'length' ] , $ environment ) ; $ model -> setMeta ( $ model :: GROUP_VALUE , [ 'class' => $ groupClass , 'value' => $ remoteNew ] ) ; // Add the group header if it differs from the last header. if ( ( $ remoteCur !== $ remoteNew ) || ( null === $ remoteCur ) ) { $ eoCount = - 1 ; $ groupClass = 'tl_folder_list' ; $ remoteCur = $ remoteNew ; } } }
Add the group header information to the model.

@param EnvironmentInterface $environment The environment.
@param array                $grouping    The grouping information.
@param ModelInterface       $model       The model.
@param string               $groupClass  The group class.
@param integer              $eoCount     The row even odd counter.
@param mixed                $remoteCur   The current remote.

@return void
Add the group header information to the model .