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);
24 * Used only in test case to get a tag for our entry.
28 public function findOneByEntryAndTagLabel($entry, $label)
30 return $this->createQueryBuilder('t')
31 ->leftJoin('t.entries', 'e')
32 ->where('e.id = :entryId')->setParameter('entryId', $entry->getId())
33 ->andWhere('t.label = :label')->setParameter('label', $label)