src/CoreBundle/Contao/Hooks/RegisterBackendNavigation.php
private function buildBackendMenuSection($groupName, Request $request)
    {
        $strRefererId = $request->attributes->get('_contao_referer_id');

        $label = $this->translator->trans('MOD.' . $groupName, [], 'contao_modules');

        if (\is_array($label)) {
            $label = $label[0];
        }

        return [
            'class'   => ' node-expanded',
            'title'   => StringUtil::specialchars($this->translator->trans('MSC.collapseNode', [], 'contao_modules')),
            'label'   => $label,
            'href'    => $this->urlGenerator->generate(
                'contao_backend',
                ['do' => $request->get('do'), 'mtg' => $groupName, 'ref' => $strRefererId]
            ),
            'ajaxUrl' => $this->urlGenerator->generate('contao_backend'),
            // backwards compatibility with e.g. EasyThemes
            'icon'    => 'modPlus.gif',
            'modules'  => [],
        ];
    }
private function buildBackendMenuSection($groupName, Request $request)
    {
        $strRefererId = $request->attributes->get('_contao_referer_id');

        $label = $this->translator->trans('MOD.' . $groupName, [], 'contao_modules');

        if (\is_array($label)) {
            $label = $label[0];
        }

        return [
            'class'   => ' node-expanded',
            'title'   => StringUtil::specialchars($this->translator->trans('MSC.collapseNode', [], 'contao_modules')),
            'label'   => $label,
            'href'    => $this->urlGenerator->generate(
                'contao_backend',
                ['do' => $request->get('do'), 'mtg' => $groupName, 'ref' => $strRefererId]
            ),
            'ajaxUrl' => $this->urlGenerator->generate('contao_backend'),
            // backwards compatibility with e.g. EasyThemes
            'icon'    => 'modPlus.gif',
            'modules'  => [],
        ];
    }
Build a menu section.

@param string  $groupName The group name.
@param Request $request   The current request.

@return array