aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/TagRepository.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-10-01 09:26:32 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-10-22 13:13:06 +0200
commit206bade58a279d7f2e34c2dbada10366b90d2d6b (patch)
tree6c5fc1fe65dfa9e661a09b3fd92253f2931b84de /src/Wallabag/CoreBundle/Repository/TagRepository.php
parente8331dd9e7772a396bb211459eca4a682c8e947e (diff)
downloadwallabag-206bade58a279d7f2e34c2dbada10366b90d2d6b.tar.gz
wallabag-206bade58a279d7f2e34c2dbada10366b90d2d6b.tar.zst
wallabag-206bade58a279d7f2e34c2dbada10366b90d2d6b.zip
Add ability to reset some datas
- annotations - tags - entries
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/TagRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/TagRepository.php17
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