]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Repository/TagRepository.php
add relation between entry and tag
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Repository / TagRepository.php
CommitLineData
b3dc0749
NL
1<?php
2
3namespace Wallabag\CoreBundle\Repository;
4
5use Doctrine\ORM\EntityRepository;
b3dc0749 6
6d37a7e6 7class TagRepository extends EntityRepository
b3dc0749 8{
0a018fe0
NL
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();
b3dc0749 18
0a018fe0
NL
19 $paginator = new Paginator($qb);
20
21 return $paginator;
22 }
b3dc0749 23}