diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-05-31 09:31:18 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2017-06-23 10:08:54 +0200 |
commit | bf6c0346d8d35a719dd1bff1cb4d573d422f99ff (patch) | |
tree | 04fb80e20ad1cffacb72357a632a9afe2ec058cb /src/Wallabag/CoreBundle/Repository/EntryRepository.php | |
parent | d6d3f4ec3698effd1d4b063e295341791bdcf7d7 (diff) | |
download | wallabag-bf6c0346d8d35a719dd1bff1cb4d573d422f99ff.tar.gz wallabag-bf6c0346d8d35a719dd1bff1cb4d573d422f99ff.tar.zst wallabag-bf6c0346d8d35a719dd1bff1cb4d573d422f99ff.zip |
WIPfederation
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
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 | } |