public function pager(Environment $env, $pagerName = '', $surr = 4, $template = '_sub_pager.twig', $class = '')
    {
        if ($this->pagerManager->isEmptyPager()) {
            // nothing to page.
            return '';
        }

        $thisPager = $this->pagerManager->getPager($pagerName);

        $context = [
            'pager'    => $thisPager,
            'surr'     => $surr, // @deprecated
            'surround' => $surr,
            'class'    => $class,
        ];

        /* Little hack to avoid doubling this function and having context without breaking frontend */
        if ($template === 'backend') {
            $template = '@bolt/components/pager.twig';
        }

        return $env->render($template, $context);
    }