diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/TagRepository.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/TagRepository.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/TagRepository.php b/src/Wallabag/CoreBundle/Repository/TagRepository.php index e76878d4..69661b12 100644 --- a/src/Wallabag/CoreBundle/Repository/TagRepository.php +++ b/src/Wallabag/CoreBundle/Repository/TagRepository.php | |||
@@ -53,6 +53,23 @@ class TagRepository extends EntityRepository | |||
53 | } | 53 | } |
54 | 54 | ||
55 | /** | 55 | /** |
56 | * Find all tags. | ||
57 | * | ||
58 | * @param int $userId | ||
59 | * | ||
60 | * @return array | ||
61 | */ | ||
62 | public function findAllTags($userId) | ||
63 | { | ||
64 | return $this->createQueryBuilder('t') | ||
65 | ->select('t') | ||
66 | ->leftJoin('t.entries', 'e') | ||
67 | ->where('e.user = :userId')->setParameter('userId', $userId) | ||
68 | ->getQuery() | ||
69 | ->getResult(); | ||
70 | } | ||
71 | |||
72 | /** | ||
56 | * Used only in test case to get a tag for our entry. | 73 | * Used only in test case to get a tag for our entry. |
57 | * | 74 | * |
58 | * @return Tag | 75 | * @return Tag |