diff options
Diffstat (limited to 'src/Wallabag/AnnotationBundle')
-rw-r--r-- | src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php index 8d3f07ee..23f21c3e 100644 --- a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php +++ b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php | |||
@@ -122,4 +122,20 @@ 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 | * @return mixed | ||
131 | */ | ||
132 | public function findAllByArchivedEntriesAndUserId($userId) | ||
133 | { | ||
134 | return $this->createQueryBuilder('a') | ||
135 | ->leftJoin('a.entry', 'e') | ||
136 | ->where('a.user = :userid')->setParameter(':userid', $userId) | ||
137 | ->andWhere('e.isArchived = true') | ||
138 | ->getQuery() | ||
139 | ->getResult(); | ||
140 | } | ||
125 | } | 141 | } |