diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntriesRepository.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntriesRepository.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntriesRepository.php b/src/Wallabag/CoreBundle/Repository/EntriesRepository.php index 5a71b9ef..edbb96b4 100644 --- a/src/Wallabag/CoreBundle/Repository/EntriesRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntriesRepository.php | |||
@@ -76,4 +76,17 @@ class EntriesRepository extends EntityRepository | |||
76 | 76 | ||
77 | return $paginator; | 77 | return $paginator; |
78 | } | 78 | } |
79 | |||
80 | public function findEntries($userId, $isArchived, $isStarred, $isDeleted, $sort, $order) | ||
81 | { | ||
82 | $qb = $this->createQueryBuilder('e') | ||
83 | ->select('e') | ||
84 | ->where('e.isFav =:isStarred')->setParameter('isStarred', $isStarred) | ||
85 | ->andWhere('e.isRead =:isArchived')->setParameter('isArchived', $isArchived) | ||
86 | ->andWhere('e.userId =:userId')->setParameter('userId', $userId) | ||
87 | ->getQuery() | ||
88 | ->getResult(Query::HYDRATE_ARRAY); | ||
89 | |||
90 | return $qb; | ||
91 | } | ||
79 | } | 92 | } |