mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-27 03:21:01 +00:00
Return pager into EntryRepository (for entries only)
This commit is contained in:
parent
a24f2c8808
commit
bcf53ab75b
1 changed files with 5 additions and 3 deletions
|
@ -4,6 +4,8 @@ namespace Wallabag\CoreBundle\Repository;
|
|||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\Tools\Pagination\Paginator;
|
||||
use Pagerfanta\Adapter\DoctrineORMAdapter;
|
||||
use Pagerfanta\Pagerfanta;
|
||||
|
||||
class EntryRepository extends EntityRepository
|
||||
{
|
||||
|
@ -114,9 +116,9 @@ class EntryRepository extends EntityRepository
|
|||
$qb->orderBy('e.updatedAt', $order);
|
||||
}
|
||||
|
||||
return $qb
|
||||
->getQuery()
|
||||
->getResult();
|
||||
$pagerAdapter = new DoctrineORMAdapter($qb);
|
||||
|
||||
return new Pagerfanta($pagerAdapter);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue