| 
					
				 | 
			
			
				@@ -19,23 +19,18 @@ use App\Repository\GenreRepository; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 use App\Repository\RealisateurRepository; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 use App\Service\CommentaireManager; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 use App\Service\FilmManager; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+use App\Service\OptionsManager; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 class VideothequeController extends AbstractController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 * @Route("/", name="videotheque_liste") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	public function listeAction(Request $request, FilmRepository $repo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	public function listeAction(Request $request, FilmRepository $repo, OptionsManager $options) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $listeFilms = $repo->findTous(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $type = "vignettes"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if ($this->isGranted('IS_AUTHENTICATED_FULLY')) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if ($this->getUser()->getProfile()->getView() === 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $type = "tableaux"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		return $this->render("videotheque/liste_$type.html.twig", array( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		return $this->render('videotheque/liste_'.$options->vue().'.html.twig', array( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             'listeFilms'	=>	$listeFilms, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             'titre'         =>  'Liste complète', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		)); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -44,7 +39,7 @@ class VideothequeController extends AbstractController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @Route("/liste-by/{id}", name="videotheque_listepargenre") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	public function  listeParGenreAction(\App\Entity\Genre $genre, FilmRepository $repo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	public function  listeParGenreAction(\App\Entity\Genre $genre, FilmRepository $repo, OptionsManager $options) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $films = $repo->findFilmWithGenre(array($genre->getName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if ($this->getUser()->getProfile()->getView() === 0) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -53,7 +48,7 @@ class VideothequeController extends AbstractController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $type = "vignettes"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return $this->render("videotheque/liste_$type.html.twig", array( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return $this->render('videotheque/liste_'.$options->vue().'.html.twig', array( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             'listeFilms'    => $films, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             'titre'         => 'Films par catégorie : '.$genre->getName() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         )); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -62,7 +57,7 @@ class VideothequeController extends AbstractController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @Route("/liste-by_real/{id}", name="videotheque_listeparreal") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public function  listeParRealisateurAction(Realisateur $realisateur, FilmRepository $repo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public function  listeParRealisateurAction(Realisateur $realisateur, FilmRepository $repo, OptionsManager $options) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $films = $repo->findFilmWithReal(array($realisateur->getNomComplet())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -72,7 +67,7 @@ class VideothequeController extends AbstractController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $type = "vignettes"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return $this->render("videotheque/liste_$type.html.twig", array( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return $this->render('videotheque/liste_'.$options->vue().'.html.twig', array( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             'listeFilms'    => $films, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             'titre'         => 'Films par réalisateur : '.$realisateur->getNomComplet() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         )); 
			 |