private function checkCsrf($tokenValue)
    {
        /** @var \Symfony\Component\Security\Csrf\CsrfTokenManager $csrfTokenManager */
        $csrfTokenManager = $this->get('security.csrf.token_manager');

        $token = new CsrfToken('datagrid', $tokenValue);

        if (!$csrfTokenManager->isTokenValid($token)) {
            throw new AccessDeniedException('Invalid token');
        }
    }