aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/TagRepository.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-20 20:29:33 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-03-06 20:50:30 +0100
commit0a018fe03980b35c9f7aca838e67a8efa43b7f2d (patch)
treed531ff5c3051871dd5315e26e50ec45c7da2b16b /src/Wallabag/CoreBundle/Repository/TagRepository.php
parent6d37a7e6c11666c2c220c9eb358a877f15bcfa0e (diff)
downloadwallabag-0a018fe03980b35c9f7aca838e67a8efa43b7f2d.tar.gz
wallabag-0a018fe03980b35c9f7aca838e67a8efa43b7f2d.tar.zst
wallabag-0a018fe03980b35c9f7aca838e67a8efa43b7f2d.zip
add relation between entry and tag
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/TagRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/TagRepository.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/TagRepository.php b/src/Wallabag/CoreBundle/Repository/TagRepository.php
index 903a99cd..0f362f79 100644
--- a/src/Wallabag/CoreBundle/Repository/TagRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/TagRepository.php
@@ -6,5 +6,18 @@ use Doctrine\ORM\EntityRepository;
6 6
7class TagRepository extends EntityRepository 7class TagRepository extends EntityRepository
8{ 8{
9 public function findByEntries($entryId)
10 {
11 $qb = $this->createQueryBuilder('t')
12 ->select('t')
13 ->leftJoin('t.id', 'u')
14 ->where('e.isStarred = true')
15 ->andWhere('u.id =:userId')->setParameter('userId', $userId)
16 ->orderBy('e.createdAt', 'desc')
17 ->getQuery();
9 18
19 $paginator = new Paginator($qb);
20
21 return $paginator;
22 }
10} 23}