<?php
namespace App\Controller;
use App\Service\DataService;
use App\Service\PublicFunction;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Validator\Constraints\DateTime;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class pageController extends AbstractController
{
private $client;
private $dataService;
public function __construct(HttpClientInterface $client, DataService $dataService)
{
$this->client = $client;
$this->dataService = $dataService;
}
/**
* @Route("/parcours_de_soins_auditif", name="parcours_auditif")
*/
public function index()
{
return $this->render('page/parcours_de_soins_auditif.html.twig', [
'title' => 'Exemple de contenu avec des éléments H1 à H4',
]);
}
// /**
// * @Route("/infos-auditives")
// */
// public function renderInfosPage()
// {
// $response = $this->client->request(
// 'GET',
// "{$_ENV['BASE_API']}admin/pages"
// );
// $content = $response->toArray()["pages"];
// //dd($content);
// return $this->render('./page/page.html.twig', array(
// "pages" => json_encode($content),
// "pro" => "false",
// "base" => "base.html.twig"
// ));
// }
/**
* @Route("/infos-auditives/{id}", name="getInfoAuditiveById")
*/
public function renderPageInfo(int $id)
{
$response = $this->client->request(
'GET',
"{$_ENV['BASE_API']}info-auditives/" . $id
);
$content = $response->toArray();
$category = $this->client->request(
'GET',
"{$_ENV['BASE_API']}pages/categories"
);
$response = $this->client->request(
'GET',
"{$_ENV['BASE_API']}admin/pages"
);
$pages = $response->toArray()["pages"];
return $this->render('./page/article.html.twig', array(
"page" => $content,
"category" => $category->toArray()['content'],
"pages" => $pages,
"id" => $id,
"pro" => "false",
"base" => "base.html.twig"
));
}
// Page Outil Intournable
/**
* @Route("/outil_incontournable", name="outil_incontournable")
*/
public function renderOutil()
{
return $this->render('page/outil_incontournable.html.twig', [
"base" => "base.html.twig"
]);
}
// Prix et remboursement
/**
* @Route("/prix_remboursement", name="prix_remboursement")
*/
public function renderPrix()
{
return $this->render('page/prix_remboursement.html.twig', [
"base" => "base.html.twig"
]);
}
/**
* @Route("/pro/inscription/test", name="render_center_test")
*/
public function renderCenterTest()
{
//dd("developer_mode");
return $this->render('partner/inscription.html.twig');
// return $this->render('page/test.twig');
}
// Hyperacausie
/**
* @Route("/hyperacousie", name="hyperacousie")
*/
public function renderHyperacousie()
{
return $this->render('page/hyperacousie.html.twig', [
"base" => "base.html.twig"
]);
}
// Ouvrir son cabinet
/**
* @Route("/ouvrir_son_cabinet", name="ouvrir_son_cabinet")
*/
public function renderouvrir_son_cabinet()
{
return $this->render('page/ouvrir_son_cabinet.html.twig', [
"base" => "base.html.twig"
]);
}
// maladie ménière
/**
* @Route("/maladie_meniere", name="maladie_meniere")
*/
public function rendermeniere()
{
return $this->render('page/maladie_meniere.html.twig', [
"base" => "base.html.twig"
]);
}
/**
* @Route("/test_integration", name="test_meniere")
*/
public function testIntegration()
{
$response = $this->client->request(
'GET',
"{$_ENV['BASE_API']}faqs"
);
$content = $response->toArray()["faqs"];
$response = $this->client->request(
'GET',
"{$_ENV['BASE_API']}articles?limit=10"
);
$contentArticles = $response->toArray()["articles"];
return $this->render('centre/integration-centre.html.twig', [
"base" => "base.html.twig",
"faqs" => $content,
"articles" => $contentArticles
]);
}
/**
* @Route("/test_integration_imported", name="test_meniere_imported")
*/
public function testIntegrationImported()
{
$response = $this->client->request(
'GET',
"{$_ENV['BASE_API']}faqs"
);
$content = $response->toArray()["faqs"];
$response = $this->client->request(
'GET',
"{$_ENV['BASE_API']}articles?limit=10"
);
$contentArticles = $response->toArray()["articles"];
return $this->render('centre/integration-center-imported.html.twig', [
"base" => "base.html.twig",
"faqs" => $content,
"articles" => $contentArticles
]);
}
/**
* @Route("/pages/{slug}", name="parcours_auditif")
*/
public function pagesStatiques($slug = 'b2c')
{
$cities = $this->dataService->fetchCity();
$pagesList = [
'prix-prise-encharge-et-remboursement-des-appareils-auditifs',
//'myaudiopro-developper-son-centre-auditif',
//'myaudio-partenarirat-officiel-BNPPARIBAS',
'le-parcours-de-soin-auditif-patient-audioprothesiste',
// 'tout-savoir-sur-les-otites',
//'tout-savoir-sur-l-hyperacousie',
//'la-maladie-de-meniere-audition',
//'la-reeducation-auditive-avec-les-appareils-auditifs-et-votre-audioprothesiste-my-audio',
//'myaudiopro-outil-puissant-et-personnalisable-pour-les-audioprothésistes',
//'myaudiopro-audioprothesiste-avoir-une-patientele-qualifiee-et-fidele',
'myaudio-salon-des-seniors',
//'application-mobile-apple-et-android-myaudio',
];
if (!in_array($slug, $pagesList)) {
throw new NotFoundHttpException('La page demandée n\'existe pas.');
}
return $this->render('page-statique/' . $slug . '.html.twig', [
"base" => "base.html.twig",
'cities' => $cities,
]);
}
/**
* @Route("/pro/myaudiopro-developper-son-centre-auditif", name="parcours_auditif_pro")
*/
public function pagesStatiques1()
{
$cities = $this->dataService->fetchCity();
return $this->render('page-statique/myaudiopro-developper-son-centre-auditif.html.twig', [
"base" => "base.html.twig",
'cities' => $cities,
]);
}
/**
* @Route("/pro/myaudio-partenarirat-officiel-BNPPARIBAS", name="parcours_auditif_pro_partenaire")
*/
public function pagesStatiques2()
{
$cities = $this->dataService->fetchCity();
return $this->render('page-statique/myaudio-partenarirat-officiel-BNPPARIBAS.html.twig', [
"base" => "base.html.twig",
'cities' => $cities,
]);
}
/**
* @Route("/pro/myaudiopro-outil-puissant-et-personnalisable-pour-les-audioprothésistes", name="parcours_auditif_pro_outil")
*/
public function pagesStatiques3()
{
$cities = $this->dataService->fetchCity();
return $this->render('page-statique/myaudiopro-outil-puissant-et-personnalisable-pour-les-audioprothésistes.html.twig', [
"base" => "base.html.twig",
'cities' => $cities,
]);
}
/**
* @Route("/pro/myaudiopro-audioprothesiste-avoir-une-patientele-qualifiee-et-fidele", name="parcours_auditif_pro_patientele")
*/
public function pagesStatiques4()
{
$cities = $this->dataService->fetchCity();
return $this->render('page-statique/myaudiopro-audioprothesiste-avoir-une-patientele-qualifiee-et-fidele.html.twig', [
"base" => "base.html.twig",
'cities' => $cities,
]);
}
/**
* @Route("/ensavoirplus/tout-savoir-sur-les-otites", name="parcours_auditif_savoirplus")
*/
public function pagesStatiques5()
{
$cities = $this->dataService->fetchCity();
return $this->render('page-statique/tout-savoir-sur-les-otites.html.twig', [
"base" => "base.html.twig",
'cities' => $cities,
]);
}
/**
* @Route("/ensavoirplus/trouver-un-audiorpothésiste-application-mobile-apple-et-android-myaudioapp", name="parcours_auditif_savoirplus_app")
*/
public function pagesStatiques9()
{
$cities = $this->dataService->fetchCity();
return $this->render('page-statique/trouver-un-audiorpothésiste-application-mobile-apple-et-android-myaudioapp.html.twig', [
"base" => "base.html.twig",
'cities' => $cities,
]);
}
/**
* @Route("/ensavoirplus/tout-savoir-sur-l-hyperacousie", name="parcours_auditif_savoirplus_hyperacousie")
*/
public function pagesStatiques6()
{
$cities = $this->dataService->fetchCity();
return $this->render('page-statique/tout-savoir-sur-l-hyperacousie.html.twig', [
"base" => "base.html.twig",
'cities' => $cities,
]);
}
/**
* @Route("/ensavoirplus/la-maladie-de-meniere-audition", name="parcours_auditif_savoirplus_meniere")
*/
public function pagesStatiques7()
{
$cities = $this->dataService->fetchCity();
return $this->render('page-statique/la-maladie-de-meniere-audition.html.twig', [
"base" => "base.html.twig",
'cities' => $cities,
]);
}
/**
* @Route("/ensavoirplus/la-reeducation-auditive-avec-les-appareils-auditifs-et-votre-audioprothesiste-my-audio", name="parcours_auditif_savoirplus_les_auditive")
*/
public function pagesStatiques8()
{
$cities = $this->dataService->fetchCity();
return $this->render('page-statique/la-reeducation-auditive-avec-les-appareils-auditifs-et-votre-audioprothesiste-my-audio.html.twig', [
"base" => "base.html.twig",
'cities' => $cities,
]);
}
/**
* @Route("/audioprothesiste/{ville}/{codePostal}/{nomDuCentre}/prise-de-rdvaudioprothesiste-rapide/{id}", name="prise_rdv", methods={"GET","HEAD"})
*/
public function priseDeRdv(string $ville, string $codePostal, string $nomDuCentre, int $id, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
$encodedNomDuCentre = rawurlencode($nomDuCentre);
$urlApi = $apiBaseUrl . "audioprothesiste/{$ville}/{$codePostal}/{$encodedNomDuCentre}/prise-de-rdv/{$id}";
try {
$response = $client->request('GET', $urlApi);
$data = $response->toArray();
} catch (\Exception $e) {
return new Response(json_encode([
'error' => 'Unable to retrieve data from API.',
'message' => $e->getMessage()
]), 500);
}
return $this->render('./rdv/prise-de-rendez-vous.html.twig', [
"base" => "base.html.twig",
"centre" => $data,
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
'google_client_id' => $_ENV['GOOGLE_CLIENT_ID'],
'google_redirect_uri' => $_ENV['GOOGLE_REDIRECT_URI_RDV'],
]);
}
/**
* @Route("/callback-google", name="callback_google")
*/
public function callBackGoogle(HttpClientInterface $client, Request $req)
{
$code = $req->query->get('code');
$clientId = $_ENV['GOOGLE_CLIENT_ID'];
$clientSecret = $_ENV['GOOGLE_CLIENT_SECRET'];
$redirectUri = $_ENV['GOOGLE_REDIRECT_URI_RDV'];
$url = 'https://oauth2.googleapis.com/token';
$data = [
'code' => $code,
'client_id' => $clientId,
'client_secret' => $clientSecret,
'redirect_uri' => $redirectUri,
'grant_type' => 'authorization_code'
];
$response = $client->request('POST', $url, [
'json' => $data
]);
$responseArray = $response->toArray();
if (!isset($responseArray['access_token'])) {
throw new \Exception('Erreur lors de la récupération du jeton d\'accès.');
}
$accessToken = $responseArray['access_token'];
$profileResponse = $client->request('GET', 'https://www.googleapis.com/oauth2/v3/userinfo', [
'headers' => [
'Authorization' => 'Bearer ' . $accessToken
]
]);
$userInfo = $profileResponse->toArray();
return new Response(
'<script>
// Envoyer les informations utilisateur à la fenêtre parent
const baseApi = "' . $_ENV['BASE_API'] . '";
window.opener.postMessage(' . json_encode($userInfo) . ', baseApi);
// Fermer la popup
window.close();
</script>',
200,
['Content-Type' => 'text/html']
);
}
/**
* @Route("/prenez-rendez-vous-dans-le-centre-auditif-audioprothésiste-proche-de-chez-vous", name="prise_rdv_lead", methods={"GET","HEAD"})
*/
public function priseDeRdvLead(HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/prise-de-rendez-vous-lead.html.twig', [
"base" => "base.html.twig",
"api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
'google_client_id' => $_ENV['GOOGLE_CLIENT_ID'],
'google_redirect_uri' => $_ENV['GOOGLE_REDIRECT_URI_RDV'],
]);
}
/**
* @Route("/v1x9a7z/prenez-rendez-vous-dans-le-centre-auditif-audioprothésiste-proche-de-chez-vous", name="prise_rdv_lead_v1", methods={"GET","HEAD"})
*/
public function priseDeRdvLeadTest(HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/prise-de-rendez-vous-lead-v1.html.twig', [
"base" => "base.html.twig",
"api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
'google_client_id' => $_ENV['GOOGLE_CLIENT_ID'],
'google_redirect_uri' => $_ENV['GOOGLE_REDIRECT_URI_RDV'],
]);
}
/**
* @Route("/v2x9a7z/prenez-rendez-vous-dans-le-centre-auditif-audioprothésiste-proche-de-chez-vous", name="prise_rdv_lead_v2", methods={"GET","HEAD"})
*/
public function priseDeRdvLeadV2(HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/prise-de-rendez-vous-lead-v2.html.twig', [
"base" => "base.html.twig",
"api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
'google_client_id' => $_ENV['GOOGLE_CLIENT_ID'],
'google_redirect_uri' => $_ENV['GOOGLE_REDIRECT_URI_RDV'],
]);
}
/**
* @Route("/v3x9a7z/prenez-rendez-vous-dans-le-centre-auditif-audioprothésiste-proche-de-chez-vous", name="prise_rdv_lead_v3", methods={"GET","HEAD"})
*/
public function priseDeRdvLeadV3(HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/prise-de-rendez-vous-lead-v3.html.twig', [
"base" => "base.html.twig",
"api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
'google_client_id' => $_ENV['GOOGLE_CLIENT_ID'],
'google_redirect_uri' => $_ENV['GOOGLE_REDIRECT_URI_RDV'],
]);
}
/**
* @Route("/article-100-pourcent-sante-audioprothésiste", name="article_100_pourcent_sante", methods={"GET","HEAD"})
*/
public function articleMyAudioSante(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/article/article-sante.html.twig', [
"base" => "base.html.twig",
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/article-appareil-auditif-invisible", name="article_appareil_invisible", methods={"GET","HEAD"})
*/
public function articleAppareilInvisible(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/article/article-appareil-invisible.html.twig', [
"base" => "base.html.twig",
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/article-parcours-sante-auditif", name="article_parcours_sante", methods={"GET","HEAD"})
*/
public function articleParcoursSanteAuditive(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/article/article-parcours-sante.html.twig', [
"base" => "base.html.twig",
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/article-prix-et-remboursement-des-aides-auditives", name="article_prix_remboursement", methods={"GET","HEAD"})
*/
public function articlePrixEtRemboursement(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/article/article-prix-remboursement.html.twig', [
"base" => "base.html.twig",
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/article-appareil-auditif-rechargeable", name="article_appareil_rechargeable", methods={"GET","HEAD"})
*/
public function articleAppareilRechargeable(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/article/article-appareil-rechargeable.html.twig', [
"base" => "base.html.twig",
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/lp-article-100-pourcent-sante-audioprothésiste", name="article_100_pourcent_sante_v2", methods={"GET","HEAD"})
*/
public function articleMyAudioSanteV2(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/article/article-sante-v2.html.twig', [
"base" => "base.html.twig",
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/lp-article-appareil-auditif-invisible", name="article_appareil_invisible_v2", methods={"GET","HEAD"})
*/
public function articleAppareilInvisibleV2(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/article/article-appareil-invisible-v2.html.twig', [
"base" => "base.html.twig",
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/lp-article-parcours-sante-auditif", name="article_parcours_sante_v2", methods={"GET","HEAD"})
*/
public function articleParcoursSanteAuditiveV2(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/article/article-parcours-sante-v2.html.twig', [
"base" => "base.html.twig",
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/lp-article-prix-et-remboursement-des-aides-auditives", name="article_prix_remboursement_v2", methods={"GET","HEAD"})
*/
public function articlePrixEtRemboursementV2(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/article/article-prix-remboursement-v2.html.twig', [
"base" => "base.html.twig",
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/lp-article-appareil-auditif-rechargeable", name="article_appareil_rechargeable_v2", methods={"GET","HEAD"})
*/
public function articleAppareilRechargeableV2(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/article/article-appareil-rechargeable-v2.html.twig', [
"base" => "base.html.twig",
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/test-auditif-gratuit-appareillage-auditif-rembourse-verifiez-eligibilite-30s-audioprothesiste", name="lp_v4", methods={"GET","HEAD"})
*/
public function landingPage(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/lp.html.twig', [
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
*
* @Route("/test-auditif-gratuit-appareillage-auditif-rembourse-verifiez-eligibilite-30s-audioprothesiste/merci", name="lp_v4_merci_prise_rdv", methods={"GET","HEAD"})
*/
public function landingPageGetRdv(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/lp-merci-prise-rdv.html.twig', [
"api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/test-auditif-gratuit-appareillage-auditif-rembourse-verifiez-eligibilite-30s-audioprothesiste/rdv-valide", name="lp_v4_merci_prise_rdv_confirm", methods={"GET","HEAD"})
*/
public function landingPageGetRdvConfirm(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/lp-confirmation-prise-rdv.html.twig', [
"api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/test-auditif-gratuit-appareillage-auditif", name="new_version_lp", methods={"GET","HEAD"})
*/
public function landingPageV4(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/v4/index.html.twig', [
"api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/hz/test-auditif-gratuit-appareillage-auditif/merci", name="new_version_lp_hz_merci", methods={"GET","HEAD"})
*/
public function landingPageV4ConfirmHZ(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/v4/hz.html.twig', [
"api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/rdv/test-auditif-gratuit-appareillage-auditif/merci", name="new_version_lp_rdv", methods={"GET","HEAD"})
*/
public function landingPageV4Rdv(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/v4/calendar.html.twig', [
"api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/rdv/test-auditif-gratuit-appareillage-auditif/confirmation", name="new_version_lp_rdv_confirmation", methods={"GET","HEAD"})
*/
public function landingPageV4RdvConfirm(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./rdv/v4/merci.html.twig', [
"api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/myaudio-surdifrance", name="myaudio_surdifrance", methods={"GET","HEAD"})
*/
public function landingPageSurdiFrance(Request $request, SessionInterface $session, HttpClientInterface $client): Response
{
$apiBaseUrl = $_ENV['BASE_API'];
$clientUrl = $_ENV['BASE_client'];
return $this->render('./partner/myaudio-surdifrance.html.twig', [
"api_key" => $_ENV['GOOGLE_API_MAP_RDV'],
"apiBaseUrl" => $apiBaseUrl,
"clientUrl" => $clientUrl,
]);
}
/**
* @Route("/map-google-api", name="test_api_google_map", methods={"GET","HEAD"})
*/
public function testGoogleMapApi(HttpClientInterface $client): Response
{
return $this->render('./testapi/test-api.html.twig', [
"api_key" => $_ENV['GOOGLE_API_MAP_RDV']
]);
}
}