public function generateBackendRoute(array $params = [], $addToken = true, $addReferer = true)
    {
        if ($addToken) {
            // >= contao 4.6.8 uses contao.csrf.token_manager service to validate token
            if (System::getContainer()->has('contao.csrf.token_manager')) {
                $params['rt'] = System::getContainer()->get('contao.csrf.token_manager')->getToken($this->token)->getValue();
            } else {
                $params['rt'] = System::getContainer()->get('security.csrf.token_manager')->getToken($this->token)->getValue();
            }
        }

        if ($addReferer) {
            $params['ref'] = $this->request->getCurrentRequest()->get('_contao_referer_id');
        }

        return $this->router->generate('contao_backend', $params);
    }