diff options
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 | } |