aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/EntryRepository.php
diff options
context:
space:
mode:
authorWilliam Durand <will+git@drnd.me>2015-03-06 11:07:22 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-03-06 21:11:01 +0100
commitbcf53ab75b2fbd0cc18faf2db61c81fa3d7c471d (patch)
tree6379e875140623415901f4aa46a6d9a98eb7a986 /src/Wallabag/CoreBundle/Repository/EntryRepository.php
parenta24f2c8808fe4921ebad475162ef58ed73305281 (diff)
downloadwallabag-bcf53ab75b2fbd0cc18faf2db61c81fa3d7c471d.tar.gz
wallabag-bcf53ab75b2fbd0cc18faf2db61c81fa3d7c471d.tar.zst
wallabag-bcf53ab75b2fbd0cc18faf2db61c81fa3d7c471d.zip
Return pager into EntryRepository (for entries only)
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index 04fe6aa3..53e8e2ba 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -4,6 +4,8 @@ namespace Wallabag\CoreBundle\Repository;
4 4
5use Doctrine\ORM\EntityRepository; 5use Doctrine\ORM\EntityRepository;
6use Doctrine\ORM\Tools\Pagination\Paginator; 6use Doctrine\ORM\Tools\Pagination\Paginator;
7use Pagerfanta\Adapter\DoctrineORMAdapter;
8use Pagerfanta\Pagerfanta;
7 9
8class EntryRepository extends EntityRepository 10class EntryRepository extends EntityRepository
9{ 11{
@@ -114,9 +116,9 @@ class EntryRepository extends EntityRepository
114 $qb->orderBy('e.updatedAt', $order); 116 $qb->orderBy('e.updatedAt', $order);
115 } 117 }
116 118
117 return $qb 119 $pagerAdapter = new DoctrineORMAdapter($qb);
118 ->getQuery() 120
119 ->getResult(); 121 return new Pagerfanta($pagerAdapter);
120 } 122 }
121 123
122 /** 124 /**