diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntryRepository.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index d70d6ca6..9a30cd79 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -365,6 +365,23 @@ class EntryRepository extends EntityRepository | |||
365 | } | 365 | } |
366 | 366 | ||
367 | /** | 367 | /** |
368 | * @param int $userId | ||
369 | * | ||
370 | * @return array | ||
371 | */ | ||
372 | public function getAllEntriesId($userId = null) | ||
373 | { | ||
374 | $qb = $this->createQueryBuilder('e') | ||
375 | ->select('e.id'); | ||
376 | |||
377 | if (null !== $userId) { | ||
378 | $qb->where('e.user = :userid')->setParameter(':userid', $userId); | ||
379 | } | ||
380 | |||
381 | return $qb->getQuery()->getArrayResult(); | ||
382 | } | ||
383 | |||
384 | /** | ||
368 | * Find all entries by url and owner. | 385 | * Find all entries by url and owner. |
369 | * | 386 | * |
370 | * @param $url | 387 | * @param $url |