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