diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/TagRepository.php | 13 |
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 | ||
7 | class TagRepository extends EntityRepository | 7 | class 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 | } |