src/Controller/pageController.php line 811

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Service\DataService;
  4. use App\Service\PublicFunction;
  5. use Symfony\Component\HttpFoundation\Request;
  6. use Symfony\Component\HttpFoundation\Response;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. use Symfony\Component\Validator\Constraints\DateTime;
  9. use Symfony\Contracts\HttpClient\HttpClientInterface;
  10. use Symfony\Component\HttpFoundation\Session\SessionInterface;
  11. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  12. use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
  13. class pageController extends AbstractController
  14. {
  15.     private $client;
  16.     private $dataService;
  17.     public function __construct(HttpClientInterface $clientDataService $dataService)
  18.     {
  19.         $this->client $client;
  20.         $this->dataService $dataService;
  21.     }
  22.     /**
  23.      * @Route("/parcours_de_soins_auditif", name="parcours_auditif")
  24.      */
  25.     public function index()
  26.     {
  27.         return $this->render('page/parcours_de_soins_auditif.html.twig', [
  28.             'title' => 'Exemple de contenu avec des éléments H1 à H4',
  29.         ]);
  30.     }
  31.     //      /**
  32.     //      * @Route("/infos-auditives")
  33.     //      */
  34.     //     public function renderInfosPage()
  35.     //     {
  36.     //         $response = $this->client->request(
  37.     //             'GET',
  38.     //             "{$_ENV['BASE_API']}admin/pages"
  39.     //         );
  40.     //         $content = $response->toArray()["pages"];
  41.     // //dd($content);
  42.     //         return $this->render('./page/page.html.twig', array(
  43.     //             "pages" => json_encode($content),
  44.     //             "pro" => "false",
  45.     //             "base" => "base.html.twig"
  46.     //         ));
  47.     //     }
  48.     /**
  49.      * @Route("/infos-auditives/{id}", name="getInfoAuditiveById")
  50.      */
  51.     public function renderPageInfo(int $id)
  52.     {
  53.         $response $this->client->request(
  54.             'GET',
  55.             "{$_ENV['BASE_API']}info-auditives/" $id
  56.         );
  57.         $content $response->toArray();
  58.         $category $this->client->request(
  59.             'GET',
  60.             "{$_ENV['BASE_API']}pages/categories"
  61.         );
  62.         $response $this->client->request(
  63.             'GET',
  64.             "{$_ENV['BASE_API']}admin/pages"
  65.         );
  66.         $pages $response->toArray()["pages"];
  67.         return $this->render('./page/article.html.twig', array(
  68.             "page" => $content,
  69.             "category" => $category->toArray()['content'],
  70.             "pages" => $pages,
  71.             "id" => $id,
  72.             "pro" => "false",
  73.             "base" => "base.html.twig"
  74.         ));
  75.     }
  76.     // Page Outil Intournable
  77.     /**
  78.      * @Route("/outil_incontournable", name="outil_incontournable")
  79.      */
  80.     public function renderOutil()
  81.     {
  82.         return $this->render('page/outil_incontournable.html.twig', [
  83.             "base" => "base.html.twig"
  84.         ]);
  85.     }
  86.     // Prix et remboursement
  87.     /**
  88.      * @Route("/prix_remboursement", name="prix_remboursement")
  89.      */
  90.     public function renderPrix()
  91.     {
  92.         return $this->render('page/prix_remboursement.html.twig', [
  93.             "base" => "base.html.twig"
  94.         ]);
  95.     }
  96.     /**
  97.      * @Route("/pro/inscription/test", name="render_center_test")
  98.      */
  99.     public function renderCenterTest()
  100.     {
  101.         //dd("developer_mode");
  102.         return $this->render('partner/inscription.html.twig');
  103.         // return $this->render('page/test.twig');
  104.     }
  105.     // Hyperacausie
  106.     /**
  107.      * @Route("/hyperacousie", name="hyperacousie")
  108.      */
  109.     public function renderHyperacousie()
  110.     {
  111.         return $this->render('page/hyperacousie.html.twig', [
  112.             "base" => "base.html.twig"
  113.         ]);
  114.     }
  115.     // Ouvrir son cabinet
  116.     /**
  117.      * @Route("/ouvrir_son_cabinet", name="ouvrir_son_cabinet")
  118.      */
  119.     public function renderouvrir_son_cabinet()
  120.     {
  121.         return $this->render('page/ouvrir_son_cabinet.html.twig', [
  122.             "base" => "base.html.twig"
  123.         ]);
  124.     }
  125.     // maladie ménière
  126.     /**
  127.      * @Route("/maladie_meniere", name="maladie_meniere")
  128.      */
  129.     public function rendermeniere()
  130.     {
  131.         return $this->render('page/maladie_meniere.html.twig', [
  132.             "base" => "base.html.twig"
  133.         ]);
  134.     }
  135.     /**
  136.      * @Route("/test_integration", name="test_meniere")
  137.      */
  138.     public function testIntegration()
  139.     {
  140.         $response $this->client->request(
  141.             'GET',
  142.             "{$_ENV['BASE_API']}faqs"
  143.         );
  144.         $content $response->toArray()["faqs"];
  145.         $response $this->client->request(
  146.             'GET',
  147.             "{$_ENV['BASE_API']}articles?limit=10"
  148.         );
  149.         $contentArticles $response->toArray()["articles"];
  150.         return $this->render('centre/integration-centre.html.twig', [
  151.             "base" => "base.html.twig",
  152.             "faqs" => $content,
  153.             "articles" => $contentArticles
  154.         ]);
  155.     }
  156.     /**
  157.      * @Route("/test_integration_imported", name="test_meniere_imported")
  158.      */
  159.     public function testIntegrationImported()
  160.     {
  161.         $response $this->client->request(
  162.             'GET',
  163.             "{$_ENV['BASE_API']}faqs"
  164.         );
  165.         $content $response->toArray()["faqs"];
  166.         $response $this->client->request(
  167.             'GET',
  168.             "{$_ENV['BASE_API']}articles?limit=10"
  169.         );
  170.         $contentArticles $response->toArray()["articles"];
  171.         return $this->render('centre/integration-center-imported.html.twig', [
  172.             "base" => "base.html.twig",
  173.             "faqs" => $content,
  174.             "articles" => $contentArticles
  175.         ]);
  176.     }
  177.     /**
  178.      * @Route("/pages/{slug}", name="parcours_auditif")
  179.      */
  180.     public function pagesStatiques($slug 'b2c')
  181.     {
  182.         $cities =  $this->dataService->fetchCity();
  183.         $pagesList = [
  184.             'prix-prise-encharge-et-remboursement-des-appareils-auditifs',
  185.             //'myaudiopro-developper-son-centre-auditif',
  186.             //'myaudio-partenarirat-officiel-BNPPARIBAS',
  187.             'le-parcours-de-soin-auditif-patient-audioprothesiste',
  188.             // 'tout-savoir-sur-les-otites',
  189.             //'tout-savoir-sur-l-hyperacousie',
  190.             //'la-maladie-de-meniere-audition',
  191.             //'la-reeducation-auditive-avec-les-appareils-auditifs-et-votre-audioprothesiste-my-audio',
  192.             //'myaudiopro-outil-puissant-et-personnalisable-pour-les-audioprothésistes',
  193.             //'myaudiopro-audioprothesiste-avoir-une-patientele-qualifiee-et-fidele',
  194.             'myaudio-salon-des-seniors',
  195.             //'application-mobile-apple-et-android-myaudio',
  196.         ];
  197.         if (!in_array($slug$pagesList)) {
  198.             throw new NotFoundHttpException('La page demandée n\'existe pas.');
  199.         }
  200.         return $this->render('page-statique/' $slug '.html.twig', [
  201.             "base" => "base.html.twig",
  202.             'cities' => $cities,
  203.         ]);
  204.     }
  205.     /**
  206.      * @Route("/pro/myaudiopro-developper-son-centre-auditif", name="parcours_auditif_pro")
  207.      */
  208.     public function pagesStatiques1()
  209.     {
  210.         $cities =  $this->dataService->fetchCity();
  211.         return $this->render('page-statique/myaudiopro-developper-son-centre-auditif.html.twig', [
  212.             "base" => "base.html.twig",
  213.             'cities' => $cities,
  214.         ]);
  215.     }
  216.     /**
  217.      * @Route("/pro/myaudio-partenarirat-officiel-BNPPARIBAS", name="parcours_auditif_pro_partenaire")
  218.      */
  219.     public function pagesStatiques2()
  220.     {
  221.         $cities =  $this->dataService->fetchCity();
  222.         return $this->render('page-statique/myaudio-partenarirat-officiel-BNPPARIBAS.html.twig', [
  223.             "base" => "base.html.twig",
  224.             'cities' => $cities,
  225.         ]);
  226.     }
  227.     /**
  228.      * @Route("/pro/myaudiopro-outil-puissant-et-personnalisable-pour-les-audioprothésistes", name="parcours_auditif_pro_outil")
  229.      */
  230.     public function pagesStatiques3()
  231.     {
  232.         $cities =  $this->dataService->fetchCity();
  233.         return $this->render('page-statique/myaudiopro-outil-puissant-et-personnalisable-pour-les-audioprothésistes.html.twig', [
  234.             "base" => "base.html.twig",
  235.             'cities' => $cities,
  236.         ]);
  237.     }
  238.     /**
  239.      * @Route("/pro/myaudiopro-audioprothesiste-avoir-une-patientele-qualifiee-et-fidele", name="parcours_auditif_pro_patientele")
  240.      */
  241.     public function pagesStatiques4()
  242.     {
  243.         $cities =  $this->dataService->fetchCity();
  244.         return $this->render('page-statique/myaudiopro-audioprothesiste-avoir-une-patientele-qualifiee-et-fidele.html.twig', [
  245.             "base" => "base.html.twig",
  246.             'cities' => $cities,
  247.         ]);
  248.     }
  249.     /**
  250.      * @Route("/ensavoirplus/tout-savoir-sur-les-otites", name="parcours_auditif_savoirplus")
  251.      */
  252.     public function pagesStatiques5()
  253.     {
  254.         $cities =  $this->dataService->fetchCity();
  255.         return $this->render('page-statique/tout-savoir-sur-les-otites.html.twig', [
  256.             "base" => "base.html.twig",
  257.             'cities' => $cities,
  258.         ]);
  259.     }
  260.     /**
  261.      * @Route("/ensavoirplus/trouver-un-audiorpothésiste-application-mobile-apple-et-android-myaudioapp", name="parcours_auditif_savoirplus_app")
  262.      */
  263.     public function pagesStatiques9()
  264.     {
  265.         $cities =  $this->dataService->fetchCity();
  266.         return $this->render('page-statique/trouver-un-audiorpothésiste-application-mobile-apple-et-android-myaudioapp.html.twig', [
  267.             "base" => "base.html.twig",
  268.             'cities' => $cities,
  269.         ]);
  270.     }
  271.     /**
  272.      * @Route("/ensavoirplus/tout-savoir-sur-l-hyperacousie", name="parcours_auditif_savoirplus_hyperacousie")
  273.      */
  274.     public function pagesStatiques6()
  275.     {
  276.         $cities =  $this->dataService->fetchCity();
  277.         return $this->render('page-statique/tout-savoir-sur-l-hyperacousie.html.twig', [
  278.             "base" => "base.html.twig",
  279.             'cities' => $cities,
  280.         ]);
  281.     }
  282.     /**
  283.      * @Route("/ensavoirplus/la-maladie-de-meniere-audition", name="parcours_auditif_savoirplus_meniere")
  284.      */
  285.     public function pagesStatiques7()
  286.     {
  287.         $cities =  $this->dataService->fetchCity();
  288.         return $this->render('page-statique/la-maladie-de-meniere-audition.html.twig', [
  289.             "base" => "base.html.twig",
  290.             'cities' => $cities,
  291.         ]);
  292.     }
  293.     /**
  294.      * @Route("/ensavoirplus/la-reeducation-auditive-avec-les-appareils-auditifs-et-votre-audioprothesiste-my-audio", name="parcours_auditif_savoirplus_les_auditive")
  295.      */
  296.     public function pagesStatiques8()
  297.     {
  298.         $cities =  $this->dataService->fetchCity();
  299.         return $this->render('page-statique/la-reeducation-auditive-avec-les-appareils-auditifs-et-votre-audioprothesiste-my-audio.html.twig', [
  300.             "base" => "base.html.twig",
  301.             'cities' => $cities,
  302.         ]);
  303.     }
  304.     /**
  305.      * @Route("/audioprothesiste/{ville}/{codePostal}/{nomDuCentre}/prise-de-rdvaudioprothesiste-rapide/{id}", name="prise_rdv", methods={"GET","HEAD"})
  306.      */
  307.     public function priseDeRdv(string $villestring $codePostalstring $nomDuCentreint $idHttpClientInterface $client): Response
  308.     {
  309.         $apiBaseUrl $_ENV['BASE_API'];
  310.         $clientUrl $_ENV['BASE_client'];
  311.         $encodedNomDuCentre rawurlencode($nomDuCentre);
  312.         $urlApi $apiBaseUrl "audioprothesiste/{$ville}/{$codePostal}/{$encodedNomDuCentre}/prise-de-rdv/{$id}";
  313.         try {
  314.             $response $client->request('GET'$urlApi);
  315.             $data $response->toArray();
  316.         } catch (\Exception $e) {
  317.             return new Response(json_encode([
  318.                 'error' => 'Unable to retrieve data from API.',
  319.                 'message' => $e->getMessage()
  320.             ]), 500);
  321.         }
  322.         return $this->render('./rdv/prise-de-rendez-vous.html.twig', [
  323.             "base" => "base.html.twig",
  324.             "centre" => $data,
  325.             "apiBaseUrl" => $apiBaseUrl,
  326.             "clientUrl" => $clientUrl,
  327.             'google_client_id' => $_ENV['GOOGLE_CLIENT_ID'],
  328.             'google_redirect_uri' => $_ENV['GOOGLE_REDIRECT_URI_RDV'],
  329.         ]);
  330.     }
  331.     /**
  332.      * @Route("/callback-google", name="callback_google")
  333.      */
  334.     public function callBackGoogle(HttpClientInterface $clientRequest $req)
  335.     {
  336.         $code $req->query->get('code');
  337.         $clientId $_ENV['GOOGLE_CLIENT_ID'];
  338.         $clientSecret $_ENV['GOOGLE_CLIENT_SECRET'];
  339.         $redirectUri $_ENV['GOOGLE_REDIRECT_URI_RDV'];
  340.         $url 'https://oauth2.googleapis.com/token';
  341.         $data = [
  342.             'code' => $code,
  343.             'client_id' => $clientId,
  344.             'client_secret' => $clientSecret,
  345.             'redirect_uri' => $redirectUri,
  346.             'grant_type' => 'authorization_code'
  347.         ];
  348.         $response $client->request('POST'$url, [
  349.             'json' => $data
  350.         ]);
  351.         $responseArray $response->toArray();
  352.         if (!isset($responseArray['access_token'])) {
  353.             throw new \Exception('Erreur lors de la récupération du jeton d\'accès.');
  354.         }
  355.         $accessToken $responseArray['access_token'];
  356.         $profileResponse $client->request('GET''https://www.googleapis.com/oauth2/v3/userinfo', [
  357.             'headers' => [
  358.                 'Authorization' => 'Bearer ' $accessToken
  359.             ]
  360.         ]);
  361.         $userInfo $profileResponse->toArray();
  362.         return new Response(
  363.             '<script>
  364.                 // Envoyer les informations utilisateur à la fenêtre parent
  365.                 const baseApi = "' $_ENV['BASE_API'] . '";
  366.                 window.opener.postMessage(' json_encode($userInfo) . ', baseApi);
  367.                 // Fermer la popup
  368.                 window.close();
  369.             </script>',
  370.             200,
  371.             ['Content-Type' => 'text/html']
  372.         );
  373.     }
  374.     /**
  375.      * @Route("/prenez-rendez-vous-dans-le-centre-auditif-audioprothésiste-proche-de-chez-vous", name="prise_rdv_lead", methods={"GET","HEAD"})
  376.      */
  377.     public function priseDeRdvLead(HttpClientInterface $client): Response
  378.     {
  379.         $apiBaseUrl $_ENV['BASE_API'];
  380.         $clientUrl $_ENV['BASE_client'];
  381.         return $this->render('./rdv/prise-de-rendez-vous-lead.html.twig', [
  382.             "base" => "base.html.twig",
  383.             "api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
  384.             "apiBaseUrl" => $apiBaseUrl,
  385.             "clientUrl" => $clientUrl,
  386.             'google_client_id' => $_ENV['GOOGLE_CLIENT_ID'],
  387.             'google_redirect_uri' => $_ENV['GOOGLE_REDIRECT_URI_RDV'],
  388.         ]);
  389.     }
  390.     /**
  391.      * @Route("/v1x9a7z/prenez-rendez-vous-dans-le-centre-auditif-audioprothésiste-proche-de-chez-vous", name="prise_rdv_lead_v1", methods={"GET","HEAD"})
  392.      */
  393.     public function priseDeRdvLeadTest(HttpClientInterface $client): Response
  394.     {
  395.         $apiBaseUrl $_ENV['BASE_API'];
  396.         $clientUrl $_ENV['BASE_client'];
  397.         return $this->render('./rdv/prise-de-rendez-vous-lead-v1.html.twig', [
  398.             "base" => "base.html.twig",
  399.             "api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
  400.             "apiBaseUrl" => $apiBaseUrl,
  401.             "clientUrl" => $clientUrl,
  402.             'google_client_id' => $_ENV['GOOGLE_CLIENT_ID'],
  403.             'google_redirect_uri' => $_ENV['GOOGLE_REDIRECT_URI_RDV'],
  404.         ]);
  405.     }
  406.     /**
  407.      * @Route("/v2x9a7z/prenez-rendez-vous-dans-le-centre-auditif-audioprothésiste-proche-de-chez-vous", name="prise_rdv_lead_v2", methods={"GET","HEAD"})
  408.      */
  409.     public function priseDeRdvLeadV2(HttpClientInterface $client): Response
  410.     {
  411.         $apiBaseUrl $_ENV['BASE_API'];
  412.         $clientUrl $_ENV['BASE_client'];
  413.         return $this->render('./rdv/prise-de-rendez-vous-lead-v2.html.twig', [
  414.             "base" => "base.html.twig",
  415.             "api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
  416.             "apiBaseUrl" => $apiBaseUrl,
  417.             "clientUrl" => $clientUrl,
  418.             'google_client_id' => $_ENV['GOOGLE_CLIENT_ID'],
  419.             'google_redirect_uri' => $_ENV['GOOGLE_REDIRECT_URI_RDV'],
  420.         ]);
  421.     }
  422.     /**
  423.      * @Route("/v3x9a7z/prenez-rendez-vous-dans-le-centre-auditif-audioprothésiste-proche-de-chez-vous", name="prise_rdv_lead_v3", methods={"GET","HEAD"})
  424.      */
  425.     public function priseDeRdvLeadV3(HttpClientInterface $client): Response
  426.     {
  427.         $apiBaseUrl $_ENV['BASE_API'];
  428.         $clientUrl $_ENV['BASE_client'];
  429.         return $this->render('./rdv/prise-de-rendez-vous-lead-v3.html.twig', [
  430.             "base" => "base.html.twig",
  431.             "api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
  432.             "apiBaseUrl" => $apiBaseUrl,
  433.             "clientUrl" => $clientUrl,
  434.             'google_client_id' => $_ENV['GOOGLE_CLIENT_ID'],
  435.             'google_redirect_uri' => $_ENV['GOOGLE_REDIRECT_URI_RDV'],
  436.         ]);
  437.     }
  438.     /**
  439.      * @Route("/article-100-pourcent-sante-audioprothésiste", name="article_100_pourcent_sante", methods={"GET","HEAD"})
  440.      */
  441.     public function articleMyAudioSante(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  442.     {
  443.         $apiBaseUrl $_ENV['BASE_API'];
  444.         $clientUrl $_ENV['BASE_client'];
  445.         return $this->render('./rdv/article/article-sante.html.twig', [
  446.             "base" => "base.html.twig",
  447.             "apiBaseUrl" => $apiBaseUrl,
  448.             "clientUrl" => $clientUrl,
  449.         ]);
  450.     }
  451.     /**
  452.      * @Route("/article-appareil-auditif-invisible", name="article_appareil_invisible", methods={"GET","HEAD"})
  453.      */
  454.     public function articleAppareilInvisible(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  455.     {
  456.         $apiBaseUrl $_ENV['BASE_API'];
  457.         $clientUrl $_ENV['BASE_client'];
  458.         return $this->render('./rdv/article/article-appareil-invisible.html.twig', [
  459.             "base" => "base.html.twig",
  460.             "apiBaseUrl" => $apiBaseUrl,
  461.             "clientUrl" => $clientUrl,
  462.         ]);
  463.     }
  464.     /**
  465.      * @Route("/article-parcours-sante-auditif", name="article_parcours_sante", methods={"GET","HEAD"})
  466.      */
  467.     public function articleParcoursSanteAuditive(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  468.     {
  469.         $apiBaseUrl $_ENV['BASE_API'];
  470.         $clientUrl $_ENV['BASE_client'];
  471.         return $this->render('./rdv/article/article-parcours-sante.html.twig', [
  472.             "base" => "base.html.twig",
  473.             "apiBaseUrl" => $apiBaseUrl,
  474.             "clientUrl" => $clientUrl,
  475.         ]);
  476.     }
  477.     /**
  478.      * @Route("/article-prix-et-remboursement-des-aides-auditives", name="article_prix_remboursement", methods={"GET","HEAD"})
  479.      */
  480.     public function articlePrixEtRemboursement(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  481.     {
  482.         $apiBaseUrl $_ENV['BASE_API'];
  483.         $clientUrl $_ENV['BASE_client'];
  484.         return $this->render('./rdv/article/article-prix-remboursement.html.twig', [
  485.             "base" => "base.html.twig",
  486.             "apiBaseUrl" => $apiBaseUrl,
  487.             "clientUrl" => $clientUrl,
  488.         ]);
  489.     }
  490.     /**
  491.      * @Route("/article-appareil-auditif-rechargeable", name="article_appareil_rechargeable", methods={"GET","HEAD"})
  492.      */
  493.     public function articleAppareilRechargeable(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  494.     {
  495.         $apiBaseUrl $_ENV['BASE_API'];
  496.         $clientUrl $_ENV['BASE_client'];
  497.         return $this->render('./rdv/article/article-appareil-rechargeable.html.twig', [
  498.             "base" => "base.html.twig",
  499.             "apiBaseUrl" => $apiBaseUrl,
  500.             "clientUrl" => $clientUrl,
  501.         ]);
  502.     }
  503.      /**
  504.      * @Route("/lp-article-100-pourcent-sante-audioprothésiste", name="article_100_pourcent_sante_v2", methods={"GET","HEAD"})
  505.      */
  506.     public function articleMyAudioSanteV2(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  507.     {
  508.         $apiBaseUrl $_ENV['BASE_API'];
  509.         $clientUrl $_ENV['BASE_client'];
  510.         return $this->render('./rdv/article/article-sante-v2.html.twig', [
  511.             "base" => "base.html.twig",
  512.             "apiBaseUrl" => $apiBaseUrl,
  513.             "clientUrl" => $clientUrl,
  514.         ]);
  515.     }
  516.     /**
  517.      * @Route("/lp-article-appareil-auditif-invisible", name="article_appareil_invisible_v2", methods={"GET","HEAD"})
  518.      */
  519.     public function articleAppareilInvisibleV2(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  520.     {
  521.         $apiBaseUrl $_ENV['BASE_API'];
  522.         $clientUrl $_ENV['BASE_client'];
  523.         return $this->render('./rdv/article/article-appareil-invisible-v2.html.twig', [
  524.             "base" => "base.html.twig",
  525.             "apiBaseUrl" => $apiBaseUrl,
  526.             "clientUrl" => $clientUrl,
  527.         ]);
  528.     }
  529.     /**
  530.      * @Route("/lp-article-parcours-sante-auditif", name="article_parcours_sante_v2", methods={"GET","HEAD"})
  531.      */
  532.     public function articleParcoursSanteAuditiveV2(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  533.     {
  534.         $apiBaseUrl $_ENV['BASE_API'];
  535.         $clientUrl $_ENV['BASE_client'];
  536.         return $this->render('./rdv/article/article-parcours-sante-v2.html.twig', [
  537.             "base" => "base.html.twig",
  538.             "apiBaseUrl" => $apiBaseUrl,
  539.             "clientUrl" => $clientUrl,
  540.         ]);
  541.     }
  542.     /**
  543.      * @Route("/lp-article-prix-et-remboursement-des-aides-auditives", name="article_prix_remboursement_v2", methods={"GET","HEAD"})
  544.      */
  545.     public function articlePrixEtRemboursementV2(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  546.     {
  547.         $apiBaseUrl $_ENV['BASE_API'];
  548.         $clientUrl $_ENV['BASE_client'];
  549.         return $this->render('./rdv/article/article-prix-remboursement-v2.html.twig', [
  550.             "base" => "base.html.twig",
  551.             "apiBaseUrl" => $apiBaseUrl,
  552.             "clientUrl" => $clientUrl,
  553.         ]);
  554.     }
  555.     /**
  556.      * @Route("/lp-article-appareil-auditif-rechargeable", name="article_appareil_rechargeable_v2", methods={"GET","HEAD"})
  557.      */
  558.     public function articleAppareilRechargeableV2(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  559.     {
  560.         $apiBaseUrl $_ENV['BASE_API'];
  561.         $clientUrl $_ENV['BASE_client'];
  562.         return $this->render('./rdv/article/article-appareil-rechargeable-v2.html.twig', [
  563.             "base" => "base.html.twig",
  564.             "apiBaseUrl" => $apiBaseUrl,
  565.             "clientUrl" => $clientUrl,
  566.         ]);
  567.     }
  568.     /**
  569.      * @Route("/test-auditif-gratuit-appareillage-auditif-rembourse-verifiez-eligibilite-30s-audioprothesiste", name="lp_v4", methods={"GET","HEAD"})
  570.      */
  571.     public function landingPage(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  572.     {
  573.         $apiBaseUrl $_ENV['BASE_API'];
  574.         $clientUrl $_ENV['BASE_client'];
  575.         return $this->render('./rdv/lp.html.twig', [
  576.             "apiBaseUrl" => $apiBaseUrl,
  577.             "clientUrl" => $clientUrl,
  578.         ]);
  579.     }
  580.      /**
  581.       * 
  582.      * @Route("/test-auditif-gratuit-appareillage-auditif-rembourse-verifiez-eligibilite-30s-audioprothesiste/merci", name="lp_v4_merci_prise_rdv", methods={"GET","HEAD"})
  583.      */
  584.     public function landingPageGetRdv(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  585.     {
  586.         $apiBaseUrl $_ENV['BASE_API'];
  587.         $clientUrl $_ENV['BASE_client'];
  588.         return $this->render('./rdv/lp-merci-prise-rdv.html.twig', [
  589.             "api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
  590.             "apiBaseUrl" => $apiBaseUrl,
  591.             "clientUrl" => $clientUrl,
  592.         ]);
  593.     }
  594.      /**
  595.      * @Route("/test-auditif-gratuit-appareillage-auditif-rembourse-verifiez-eligibilite-30s-audioprothesiste/rdv-valide", name="lp_v4_merci_prise_rdv_confirm", methods={"GET","HEAD"})
  596.      */
  597.     public function landingPageGetRdvConfirm(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  598.     {
  599.         $apiBaseUrl $_ENV['BASE_API'];
  600.         $clientUrl $_ENV['BASE_client'];
  601.         return $this->render('./rdv/lp-confirmation-prise-rdv.html.twig', [
  602.             "api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
  603.             "apiBaseUrl" => $apiBaseUrl,
  604.             "clientUrl" => $clientUrl,
  605.         ]);
  606.     }
  607.        /**
  608.      * @Route("/test-auditif-gratuit-appareillage-auditif", name="new_version_lp", methods={"GET","HEAD"})
  609.      */
  610.     public function landingPageV4(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  611.     {
  612.         $apiBaseUrl $_ENV['BASE_API'];
  613.         $clientUrl $_ENV['BASE_client'];
  614.         return $this->render('./rdv/v4/index.html.twig', [
  615.             "api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
  616.             "apiBaseUrl" => $apiBaseUrl,
  617.             "clientUrl" => $clientUrl,
  618.         ]);
  619.     }
  620.       /**
  621.      * @Route("/hz/test-auditif-gratuit-appareillage-auditif/merci", name="new_version_lp_hz_merci", methods={"GET","HEAD"})
  622.      */
  623.     public function landingPageV4ConfirmHZ(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  624.     {
  625.         $apiBaseUrl $_ENV['BASE_API'];
  626.         $clientUrl $_ENV['BASE_client'];
  627.         return $this->render('./rdv/v4/hz.html.twig', [
  628.             "api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
  629.             "apiBaseUrl" => $apiBaseUrl,
  630.             "clientUrl" => $clientUrl,
  631.         ]);
  632.     }
  633.        /**
  634.      * @Route("/rdv/test-auditif-gratuit-appareillage-auditif/merci", name="new_version_lp_rdv", methods={"GET","HEAD"})
  635.      */
  636.     public function landingPageV4Rdv(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  637.     {
  638.         $apiBaseUrl $_ENV['BASE_API'];
  639.         $clientUrl $_ENV['BASE_client'];
  640.         return $this->render('./rdv/v4/calendar.html.twig', [
  641.             "api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
  642.             "apiBaseUrl" => $apiBaseUrl,
  643.             "clientUrl" => $clientUrl,
  644.         ]);
  645.     }
  646.     /**
  647.      * @Route("/rdv/test-auditif-gratuit-appareillage-auditif/confirmation", name="new_version_lp_rdv_confirmation", methods={"GET","HEAD"})
  648.      */
  649.     public function landingPageV4RdvConfirm(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  650.     {
  651.         $apiBaseUrl $_ENV['BASE_API'];
  652.         $clientUrl $_ENV['BASE_client'];
  653.         return $this->render('./rdv/v4/merci.html.twig', [
  654.             "api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
  655.             "apiBaseUrl" => $apiBaseUrl,
  656.             "clientUrl" => $clientUrl,
  657.         ]);
  658.     }
  659.     /**
  660.      * @Route("/myaudio-surdifrance", name="myaudio_surdifrance", methods={"GET","HEAD"})
  661.      */
  662.     public function landingPageSurdiFrance(Request $request,  SessionInterface $sessionHttpClientInterface $client): Response
  663.     {
  664.         $apiBaseUrl $_ENV['BASE_API'];
  665.         $clientUrl $_ENV['BASE_client'];
  666.         return $this->render('./partner/myaudio-surdifrance.html.twig', [
  667.             "api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
  668.             "apiBaseUrl" => $apiBaseUrl,
  669.             "clientUrl" => $clientUrl,
  670.         ]);
  671.     }
  672.  
  673.     /**
  674.      * @Route("/map-google-api", name="test_api_google_map", methods={"GET","HEAD"})
  675.      */
  676.     public function testGoogleMapApi(HttpClientInterface $client): Response
  677.     {
  678.         return $this->render('./testapi/test-api.html.twig', [
  679.             "api_key" => $_ENV['GOOGLE_API_MAP_RDV']
  680.         ]);
  681.     }
  682. }