|
@@ -86,18 +86,12 @@ class FilmRepository extends \Doctrine\ORM\EntityRepository
|
|
|
->getResult();
|
|
|
}
|
|
|
|
|
|
- public function findTous ($note = 0) {
|
|
|
+ public function findTous () {
|
|
|
$qb = $this->createQueryBuilder('f')
|
|
|
->leftJoin('f.authered', 'aut')->addSelect('aut')
|
|
|
->leftJoin('f.genres', 'gen')->addSelect('gen')
|
|
|
->leftJoin('f.realisateurs', 'rea')->addSelect('rea')
|
|
|
->orderBy('f.dateSubmited', 'DESC');
|
|
|
-
|
|
|
- if ($note > 0) {
|
|
|
- $qb
|
|
|
- ->andWhere('f.note >= :note')
|
|
|
- ->setParameter('note', $note);
|
|
|
- }
|
|
|
return $qb
|
|
|
->getQuery()
|
|
|
->getResult();
|