]>
Commit | Line | Data |
---|---|---|
b3dc0749 NL |
1 | <?php |
2 | ||
3 | namespace Wallabag\CoreBundle\Repository; | |
4 | ||
5 | use Doctrine\ORM\EntityRepository; | |
b3dc0749 | 6 | |
6d37a7e6 | 7 | class 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 | } |