aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/TagRepository.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-08-07 18:17:23 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-08-07 18:17:23 +0200
commit3f3fbef11f86968a991426c2a052ad42e0c16d44 (patch)
tree23c1796279ba1d44e17ed15922db737822484bad /src/Wallabag/CoreBundle/Repository/TagRepository.php
parent6ecdd48a3fadf076e062b6c634ae80f261c43e23 (diff)
downloadwallabag-3f3fbef11f86968a991426c2a052ad42e0c16d44.tar.gz
wallabag-3f3fbef11f86968a991426c2a052ad42e0c16d44.tar.zst
wallabag-3f3fbef11f86968a991426c2a052ad42e0c16d44.zip
Add tags list display
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/TagRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/TagRepository.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/TagRepository.php b/src/Wallabag/CoreBundle/Repository/TagRepository.php
index 52f319f1..51f1cd42 100644
--- a/src/Wallabag/CoreBundle/Repository/TagRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/TagRepository.php
@@ -3,7 +3,25 @@
3namespace Wallabag\CoreBundle\Repository; 3namespace Wallabag\CoreBundle\Repository;
4 4
5use Doctrine\ORM\EntityRepository; 5use Doctrine\ORM\EntityRepository;
6use Pagerfanta\Adapter\DoctrineORMAdapter;
7use Pagerfanta\Pagerfanta;
6 8
7class TagRepository extends EntityRepository 9class TagRepository extends EntityRepository
8{ 10{
11 /**
12 * Find Tags.
13 *
14 * @param int $userId
15 *
16 * @return array
17 */
18 public function findTags($userId)
19 {
20 $qb = $this->createQueryBuilder('t')
21 ->where('t.user =:userId')->setParameter('userId', $userId);
22
23 $pagerAdapter = new DoctrineORMAdapter($qb);
24
25 return new Pagerfanta($pagerAdapter);
26 }
9} 27}