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(),
            ]
        );
    }
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(),
            ]
        );
    }
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 ( ) , ] ) ; }
Renders a Pagerfanta.

The route generator can be any callable to generate
the routes receiving the page number as first and
unique argument.

@param \Pagerfanta\PagerfantaInterface $pagerfanta A pagerfanta
@param \Closure $routeGenerator A callable to generate the routes
@param array $options An array of options (optional)

@return string
Renders a Pagerfanta .