mirror of
https://github.com/wallabag/wallabag.git
synced 2024-09-28 14:22:02 +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\EntityRepository;
|
||||||
use Doctrine\ORM\Tools\Pagination\Paginator;
|
use Doctrine\ORM\Tools\Pagination\Paginator;
|
||||||
|
use Pagerfanta\Adapter\DoctrineORMAdapter;
|
||||||
|
use Pagerfanta\Pagerfanta;
|
||||||
|
|
||||||
class EntryRepository extends EntityRepository
|
class EntryRepository extends EntityRepository
|
||||||
{
|
{
|
||||||
|
@ -114,9 +116,9 @@ class EntryRepository extends EntityRepository
|
||||||
$qb->orderBy('e.updatedAt', $order);
|
$qb->orderBy('e.updatedAt', $order);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $qb
|
$pagerAdapter = new DoctrineORMAdapter($qb);
|
||||||
->getQuery()
|
|
||||||
->getResult();
|
return new Pagerfanta($pagerAdapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue