bundle/Controller/Admin/AdminController.php
protected function getPager(AdapterInterface $adapter, $currentPage)
    {
        $currentPage = (int) $currentPage;
        $pager = new Pagerfanta($adapter);
        $pager->setNormalizeOutOfRangePages(true);
        $pager->setMaxPerPage(
            $this->configResolver->getParameter('admin.max_per_page', 'netgen_information_collection')
        );
        $pager->setCurrentPage($currentPage > 0 ? $currentPage : 1);

        return $pager;
    }
protected function getPager(AdapterInterface $adapter, $currentPage)
    {
        $currentPage = (int) $currentPage;
        $pager = new Pagerfanta($adapter);
        $pager->setNormalizeOutOfRangePages(true);
        $pager->setMaxPerPage(
            $this->configResolver->getParameter('admin.max_per_page', 'netgen_information_collection')
        );
        $pager->setCurrentPage($currentPage > 0 ? $currentPage : 1);

        return $pager;
    }
protected function getPager ( AdapterInterface $ adapter , $ currentPage ) { $ currentPage = ( int ) $ currentPage ; $ pager = new Pagerfanta ( $ adapter ) ; $ pager -> setNormalizeOutOfRangePages ( true ) ; $ pager -> setMaxPerPage ( $ this -> configResolver -> getParameter ( 'admin.max_per_page' , 'netgen_information_collection' ) ) ; $ pager -> setCurrentPage ( $ currentPage > 0 ? $ currentPage : 1 ) ; return $ pager ; }
Returns configured instance of Pagerfanta

@param \Pagerfanta\Adapter\AdapterInterface $adapter
@param $currentPage

@return \Pagerfanta\Pagerfanta
Returns configured instance of Pagerfanta