|
@@ -21,6 +21,7 @@ use App\Service\CommentaireManager;
|
|
|
use App\Service\FilmManager;
|
|
|
use App\Service\OptionsManager;
|
|
|
use Symfony\Component\Form\FormFactoryInterface;
|
|
|
+use Symfony\Component\Serializer\SerializerInterface;
|
|
|
|
|
|
class VideothequeController extends AbstractController
|
|
|
{
|
|
@@ -170,13 +171,13 @@ class VideothequeController extends AbstractController
|
|
|
/**
|
|
|
* @Route("/ajax_req_realisateurs", name="videotheque_ajax_realisateurs")
|
|
|
*/
|
|
|
- public function ajaxRealisateurs(Request $request, RealisateurRepository $repo)
|
|
|
+ public function ajaxRealisateurs(RealisateurRepository $repo, SerializerInterface $serializer)
|
|
|
{
|
|
|
$realisateurs = $repo->findNomsComplets();
|
|
|
$liste = array();
|
|
|
foreach ($realisateurs as $key=>$nom)
|
|
|
{
|
|
|
- $liste[$key] = $this->get('serializer')->serialize($nom, 'json');
|
|
|
+ $liste[$key] = $serializer->serialize($nom, 'json');
|
|
|
}
|
|
|
|
|
|
return new JsonResponse($liste);
|
|
@@ -185,13 +186,13 @@ class VideothequeController extends AbstractController
|
|
|
/**
|
|
|
* @Route("/ajax_req_genres", name="videotheque_ajax_genres")
|
|
|
*/
|
|
|
- public function ajaxGenres(Request $request, GenreRepository $repo)
|
|
|
+ public function ajaxGenres(GenreRepository $repo, SerializerInterface $serializer)
|
|
|
{
|
|
|
$genres = $repo->findGenres();
|
|
|
$liste = array();
|
|
|
foreach ($genres as $key=>$nom)
|
|
|
{
|
|
|
- $liste[$key] = $this->get('serializer')->serialize($nom, 'json');
|
|
|
+ $liste[$key] = $serializer->serialize($nom, 'json');
|
|
|
}
|
|
|
|
|
|
return new JsonResponse($liste);
|