diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntryRepository.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 9bda4e15..4bbd05ff 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -4,6 +4,7 @@ namespace Wallabag\CoreBundle\Repository; | |||
4 | 4 | ||
5 | use Doctrine\ORM\EntityRepository; | 5 | use Doctrine\ORM\EntityRepository; |
6 | use Doctrine\ORM\Query; | 6 | use Doctrine\ORM\Query; |
7 | use Doctrine\ORM\QueryBuilder; | ||
7 | use Pagerfanta\Adapter\DoctrineORMAdapter; | 8 | use Pagerfanta\Adapter\DoctrineORMAdapter; |
8 | use Pagerfanta\Pagerfanta; | 9 | use Pagerfanta\Pagerfanta; |
9 | use Wallabag\CoreBundle\Entity\Tag; | 10 | use Wallabag\CoreBundle\Entity\Tag; |
@@ -89,7 +90,7 @@ class EntryRepository extends EntityRepository | |||
89 | * | 90 | * |
90 | * @param int $userId | 91 | * @param int $userId |
91 | * @param string $term | 92 | * @param string $term |
92 | * @param strint $currentRoute | 93 | * @param string $currentRoute |
93 | * | 94 | * |
94 | * @return QueryBuilder | 95 | * @return QueryBuilder |
95 | */ | 96 | */ |
@@ -414,4 +415,15 @@ class EntryRepository extends EntityRepository | |||
414 | ->getQuery() | 415 | ->getQuery() |
415 | ->getResult(); | 416 | ->getResult(); |
416 | } | 417 | } |
418 | |||
419 | /** | ||
420 | * @param $userId | ||
421 | * @return QueryBuilder | ||
422 | */ | ||
423 | public function getBuilderForRecommendationsByUser($userId) | ||
424 | { | ||
425 | return $this->getBuilderByUser($userId) | ||
426 | ->andWhere('e.recommended = true') | ||
427 | ; | ||
428 | } | ||
417 | } | 429 | } |