|
@@ -19,15 +19,17 @@ class VideothequeController extends AbstractController
|
|
|
/**
|
|
|
* @Route("/", name="videotheque_liste")
|
|
|
*/
|
|
|
- public function listeAction()
|
|
|
+ public function listeAction(Request $request)
|
|
|
{
|
|
|
+ $note = (int) $request->query->get('note');
|
|
|
$em = $this->getDoctrine()->getManager();
|
|
|
$repo = $em->getRepository('App:Film');
|
|
|
- $listeFilms = $repo->findTous();
|
|
|
+ $listeFilms = $repo->findTous($note);
|
|
|
|
|
|
return $this->render('videotheque/liste.html.twig', array(
|
|
|
'listeFilms' => $listeFilms,
|
|
|
- 'titre' => 'Liste complète'
|
|
|
+ 'titre' => 'Liste complète',
|
|
|
+ 'note' => $note
|
|
|
));
|
|
|
}
|
|
|
|