diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntryRepository.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 9bda4e15..ade3d6bc 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -414,4 +414,17 @@ class EntryRepository extends EntityRepository | |||
414 | ->getQuery() | 414 | ->getQuery() |
415 | ->getResult(); | 415 | ->getResult(); |
416 | } | 416 | } |
417 | |||
418 | /** | ||
419 | * Find all entries for a group | ||
420 | * | ||
421 | * @param $groupId | ||
422 | * @return \Doctrine\ORM\QueryBuilder | ||
423 | */ | ||
424 | public function findByGroup($groupId) | ||
425 | { | ||
426 | return $this->createQueryBuilder('p') | ||
427 | ->innerJoin('p.groupShares', 'g', 'WITH', 'g.id = :group') | ||
428 | ->setParameter(':group', $groupId); | ||
429 | } | ||
417 | } | 430 | } |