public function render(PagerfantaInterface $pagerfanta, $routeGenerator, array $options = [])
    {
        $this->pagerfanta = $pagerfanta;
        $this->routeGenerator = $routeGenerator;

        $this->initializeProximity($options);
        $this->calculateStartAndEndPage();

        return $this->twig->render(
            isset($options['template']) ? $options['template'] : $this->template,
            [
                'pager' => $pagerfanta,
                'pages' => $this->getPages(),
            ]
        );
    }