3 namespace Wallabag\CoreBundle\Repository
;
5 use Doctrine\ORM\EntityRepository
;
7 class TagRepository
extends EntityRepository
16 public function findAllTags($userId)
18 return $this->createQueryBuilder('t')
19 ->leftJoin('t.entries', 'e')
20 ->where('e.user = :userId')->setParameter('userId', $userId)
26 * Used only in test case to get a tag for our entry.
30 public function findOneByEntryAndTagLabel($entry, $label)
32 return $this->createQueryBuilder('t')
33 ->leftJoin('t.entries', 'e')
34 ->where('e.id = :entryId')->setParameter('entryId', $entry->getId())
35 ->andWhere('t.label = :label')->setParameter('label', $label)