Skip to content

Commit

Permalink
Merge pull request Sylius#1784 from agounaris/sylius-search
Browse files Browse the repository at this point in the history
Sylius search
  • Loading branch information
Paweł Jędrzejewski committed Nov 24, 2014
2 parents da21280 + 17c6fd2 commit 2746f01
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Doctrine/ORM/EntityRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Doctrine\ORM\QueryBuilder;
use Pagerfanta\Adapter\DoctrineORMAdapter;
use Pagerfanta\Pagerfanta;
use Pagerfanta\Adapter\ArrayAdapter;
use Sylius\Component\Resource\Repository\RepositoryInterface;

/**
Expand Down Expand Up @@ -130,6 +131,16 @@ public function getPaginator(QueryBuilder $queryBuilder)
return new Pagerfanta(new DoctrineORMAdapter($queryBuilder, true, false));
}

/**
* @param array $objects
*
* @return Pagerfanta
*/
public function getArrayPaginator($objects)
{
return new Pagerfanta(new ArrayAdapter($objects));
}

/**
* @return QueryBuilder
*/
Expand Down

0 comments on commit 2746f01

Please sign in to comment.