lib/Collection/Result/Pagerfanta/PagerFactory.php
public function getPager(Collection $collection, int $startPage, ?int $maxPages = null, int $flags = 0): Pagerfanta
    {
        $maxTotalCount = null;
        if (is_int($maxPages) && $maxPages > 0) {
            $maxTotalCount = $maxPages * $this->getMaxPerPage($collection);
        }

        $pagerAdapter = new ResultBuilderAdapter(
            $this->resultBuilder,
            $collection,
            $collection->getOffset(),
            $maxTotalCount,
            $flags
        );

        return $this->buildPager($pagerAdapter, $collection, $startPage);
    }
public function getPager(Collection $collection, int $startPage, ?int $maxPages = null, int $flags = 0): Pagerfanta
    {
        $maxTotalCount = null;
        if (is_int($maxPages) && $maxPages > 0) {
            $maxTotalCount = $maxPages * $this->getMaxPerPage($collection);
        }

        $pagerAdapter = new ResultBuilderAdapter(
            $this->resultBuilder,
            $collection,
            $collection->getOffset(),
            $maxTotalCount,
            $flags
        );

        return $this->buildPager($pagerAdapter, $collection, $startPage);
    }
public function getPager ( Collection $ collection , int $ startPage , ? int $ maxPages = null , int $ flags = 0 ) : Pagerfanta { $ maxTotalCount = null ; if ( is_int ( $ maxPages ) && $ maxPages > 0 ) { $ maxTotalCount = $ maxPages * $ this -> getMaxPerPage ( $ collection ) ; } $ pagerAdapter = new ResultBuilderAdapter ( $ this -> resultBuilder , $ collection , $ collection -> getOffset ( ) , $ maxTotalCount , $ flags ) ; return $ this -> buildPager ( $ pagerAdapter , $ collection , $ startPage ) ; }
Builds and returns the Pagerfanta pager for provided collection.

The pager starting page will be set to $startPage.
Builds and returns the Pagerfanta pager for provided collection .