diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2017-03-31 17:28:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-31 17:28:54 +0200 |
commit | 19122cf66037f86375072ffa60b6a43b54f02f99 (patch) | |
tree | 62dc0812bc74e08f6fec9962bb62748e95e08aae /src/Wallabag/AnnotationBundle | |
parent | fa884b30ba0f8cb4231bd37fff23ef2f41ae6cfa (diff) | |
parent | 13a592a1288d7deb49211838368583c0109a5fbd (diff) | |
download | wallabag-19122cf66037f86375072ffa60b6a43b54f02f99.tar.gz wallabag-19122cf66037f86375072ffa60b6a43b54f02f99.tar.zst wallabag-19122cf66037f86375072ffa60b6a43b54f02f99.zip |
Merge pull request #3020 from wallabag/add-remove-archived-entries
Allow to remove all archived entries
Diffstat (limited to 'src/Wallabag/AnnotationBundle')
-rw-r--r-- | src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php index 8d3f07ee..da361308 100644 --- a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php +++ b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php | |||
@@ -122,4 +122,21 @@ class AnnotationRepository extends EntityRepository | |||
122 | ->setParameter('userId', $userId) | 122 | ->setParameter('userId', $userId) |
123 | ->execute(); | 123 | ->execute(); |
124 | } | 124 | } |
125 | |||
126 | /** | ||
127 | * Find all annotations related to archived entries. | ||
128 | * | ||
129 | * @param $userId | ||
130 | * | ||
131 | * @return mixed | ||
132 | */ | ||
133 | public function findAllArchivedEntriesByUser($userId) | ||
134 | { | ||
135 | return $this->createQueryBuilder('a') | ||
136 | ->leftJoin('a.entry', 'e') | ||
137 | ->where('a.user = :userid')->setParameter(':userid', $userId) | ||
138 | ->andWhere('e.isArchived = true') | ||
139 | ->getQuery() | ||
140 | ->getResult(); | ||
141 | } | ||
125 | } | 142 | } |