public function createPager(array $criteria = [], array $sorting = [])
    {
        $queryBuilder = $this->getCollectionQueryBuilder();

        $this->applyCriteria($queryBuilder, $criteria);
        $this->applySorting($queryBuilder, $sorting);

        return $this->getPager($queryBuilder);
    }
public function createPager(array $criteria = [], array $sorting = [])
    {
        $queryBuilder = $this->getCollectionQueryBuilder();

        $this->applyCriteria($queryBuilder, $criteria);
        $this->applySorting($queryBuilder, $sorting);

        return $this->getPager($queryBuilder);
    }
public function createPager ( array $ criteria = [ ] , array $ sorting = [ ] ) { $ queryBuilder = $ this -> getCollectionQueryBuilder ( ) ; $ this -> applyCriteria ( $ queryBuilder , $ criteria ) ; $ this -> applySorting ( $ queryBuilder , $ sorting ) ; return $ this -> getPager ( $ queryBuilder ) ; }
Creates a pager.

@param array $criteria
@param array $sorting

@return Pagerfanta
Creates a pager .