X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FRepository%2FEntryRepository.php;h=9a30cd790e80091891cf4e8264e5747ffd7cd546;hb=511f1ce1e87e0f30a455ca6ed73e008bfd557f83;hp=d70d6ca6056d7e96b5445658326f809504694a26;hpb=4d2758dfa0f12ff07da6cf907de7737f19219fea;p=github%2Fwallabag%2Fwallabag.git 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 @@ -364,6 +364,23 @@ class EntryRepository extends EntityRepository return $qb->getQuery()->getArrayResult(); } + /** + * @param int $userId + * + * @return array + */ + public function getAllEntriesId($userId = null) + { + $qb = $this->createQueryBuilder('e') + ->select('e.id'); + + if (null !== $userId) { + $qb->where('e.user = :userid')->setParameter(':userid', $userId); + } + + return $qb->getQuery()->getArrayResult(); + } + /** * Find all entries by url and owner. *