private function addMenu(&$modules, $section, $name, $module, Request $request)
    {
        if (!isset($modules[$section])) {
            $modules[$section] = $this->buildBackendMenuSection($section, $request);
        }

        $active = $this->isActive($module['route'], $module['param'], $request);
        $class  = 'navigation ' . $name;
        if (isset($module['class'])) {
            $class .= ' ' . $module['class'];
        }
        if ($active) {
            $class .= ' active';
        }
        if ($request->query->has('ref')) {
            $module['param']['ref'] = $request->query->get('ref');
        }

        $modules[$section]['modules'][$name] = [
            'label'    => $module['label'],
            'title'    => $module['title'],
            'class'    => $class,
            'isActive' => $active,
            'href'     => $this->urlGenerator->generate($module['route'], $module['param']),
        ];
    }