src/Controller/ThemesWebsite/Blog/PagesController.php line 215

Open in your IDE?
  1. <?php
  2. namespace App\Controller\ThemesWebsite\Blog;
  3. use App\Entity\Core\Users;
  4. use App\Entity\Fiches\Articles;
  5. use App\Entity\Fiches\Interactions;
  6. use App\Entity\Pages\Contents;
  7. use App\Entity\Pages\Pages;
  8. use App\Entity\Pages\PagesHasBlocks;
  9. use App\Entity\Pages\SecureContent;
  10. use App\Entity\Pages\SimulationContent;
  11. use App\Entity\Pages\SimulationContentCategories;
  12. use App\Entity\Pages\SimulationContentHasCheck;
  13. use App\Form\Fiches\InteractionsAdminForm;
  14. use App\Form\Fiches\InteractionsForm;
  15. use App\Form\Fiches\InteractionsSimpleForm;
  16. use App\Form\Pages\BeforeSecureContentsForm;
  17. use App\Services\EncryptionService;
  18. use Symfony\Component\HttpFoundation\Request;
  19. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  20. use Symfony\Component\HttpFoundation\Session\Session;
  21. use Symfony\Component\Filesystem\Filesystem;
  22. use Symfony\Component\HttpFoundation\BinaryFileResponse;
  23. use Symfony\Component\HttpFoundation\ResponseHeaderBag;
  24. use Symfony\Component\HttpFoundation\StreamedResponse;
  25. use Symfony\Component\HttpFoundation\Response;
  26. use Symfony\Component\HttpFoundation\JsonResponse;
  27. use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
  28. use Symfony\Component\Form\Extension\Core\Type\TextareaType;
  29. use Symfony\Component\Form\Extension\Core\Type\TextType;
  30. use Doctrine\ORM\EntityManagerInterface;
  31. use Psr\Log\LoggerInterface;
  32. /**
  33.  * Gestion des pages
  34.  */
  35. class PagesController extends AbstractController
  36. {
  37.     private $em;
  38.     private $us;
  39.     private $es;
  40.     private $decryptionLogger;
  41.     public function __construct(EntityManagerInterface $em,
  42.                                 \App\Services\Core\Users $us,
  43.                                 EncryptionService $es,
  44.                                 LoggerInterface $decryptionLogger
  45.     ){
  46.         $this->em $em;
  47.         $this->us $us;
  48.         $this->es $es;
  49.         $this->decryptionLogger $decryptionLogger;
  50.     }
  51.     public function search(Request $request)
  52.     {
  53.         $themeSelection $_ENV['THEME_SELECTION'];
  54.         $session $request->getSession();
  55.         $page $this->em->getRepository(Pages::class)->findOneBy(['name' => 'search']);
  56.         $searchTerm "";
  57.         if(isset($_GET['search'])) {
  58.             $searchTerm $_GET['search'];
  59.         }
  60.         $articles $this->em->getRepository(\App\Entity\Articles\Articles::class)->getSearch("fr",$searchTerm);
  61.         $contents $this->em->getRepository(Contents::class)->getSearch($searchTerm);
  62.         $pages $this->em->getRepository(Pages::class)->getSearch($searchTerm);
  63.         $premiums $this->em->getRepository(Articles::class)->getSearch($searchTerm);
  64.         return $this->render('themesWebsite/blog'.$themeSelection.'/search.html.twig',[
  65.             'page' => $page,
  66.             'pages' => $pages,
  67.             'search' => $searchTerm,
  68.             'articles' => $articles,
  69.             'contents' => $contents,
  70.             'premiums' => $premiums
  71.         ]);
  72.     }
  73.     /**
  74.      * 1er niveau
  75.      * @param Request $request
  76.      * @param $folderslug
  77.      * @return mixed
  78.      */
  79.     public function fiche(Request $request$folderslug)
  80.     {
  81.         $themeSelection $_ENV['THEME_SELECTION'];
  82.         $session $request->getSession();
  83.         // Mode TEST !
  84.         if($_ENV['APP_ENV'] !== "prod") {
  85.             if($folderslug === "test") {
  86.                 $page $this->em->getRepository(Pages::class)->findOneBy(['name' => 'test']);
  87.                 return $this->render('themesWebsite/blog'.$themeSelection.'/page_test.html.twig',['page' => $page]);
  88.             }
  89.         }
  90.         // Simulation de projets
  91.         $contentSC $this->em->getRepository(SimulationContent::class)->findOneBy(['identifiant' => $folderslug]);
  92.         if ($contentSC) {
  93.             $checks $this->em->getRepository(SimulationContentHasCheck::class)->findBy(['simulationContent' => $contentSC->getId()]);
  94.             $categories $this->em->getRepository(SimulationContentCategories::class)->findBy(['simulationContent' => $contentSC->getId()]);
  95.             $categoriesOn $this->em->getRepository(SimulationContentCategories::class)->findBy(['simulationContent' => $contentSC->getId(),'onQuotation' => true'details' => true]);
  96.             $categoriesOff $this->em->getRepository(SimulationContentCategories::class)->findBy(['simulationContent' => $contentSC->getId(),'onQuotation' => false'details' => true]);
  97.             return $this->render('themesWebsite/blog'.$themeSelection.'/page_simulation.html.twig', [
  98.                 'content' => $contentSC,
  99.                 'checks' => $checks,
  100.                 'categories' => $categories,
  101.                 'categoriesOn' => $categoriesOn,
  102.                 'categoriesOff' => $categoriesOff
  103.             ]);
  104.         }
  105.         // Contenu chiffré.
  106.         $contentS $this->em->getRepository(SecureContent::class)->findOneBy(['identifiant' => $folderslug]);
  107.         if ($contentS) {
  108.             $attemptKey 'decrypt_attempts_' $folderslug;
  109.             $maxAttempts 5;
  110.             $lockoutTime 60// Temps de verrouillage en secondes (1 minute)
  111.             // Vérifiez si l'utilisateur est temporairement verrouillé
  112.             if ($session->has($attemptKey '_lockout_time') && time() < $session->get($attemptKey '_lockout_time')) {
  113.                 return $this->render('themesWebsite/blog'.$themeSelection.'/secure/lockout.html.twig', [
  114.                     'lockout_time' => $session->get($attemptKey '_lockout_time') - time(),
  115.                     'content' => $contentS,
  116.                     'folderslug' => $folderslug
  117.                 ]);
  118.             }
  119.             $attempts $session->get($attemptKey0);
  120.             if ($attempts >= $maxAttempts) {
  121.                 // Verrouillez l'accès pour un certain temps
  122.                 $session->set($attemptKey '_lockout_time'time() + $lockoutTime);
  123.                 $session->remove($attemptKey); // Réinitialisez le compteur de tentatives
  124.                 return $this->render('themesWebsite/blog'.$themeSelection.'/secure/lockout.html.twig', [
  125.                     'lockout_time' => $lockoutTime,
  126.                     'content' => $contentS,
  127.                     'folderslug' => $folderslug
  128.                 ]);
  129.             }
  130.             $form $this->createForm(BeforeSecureContentsForm::class, $contentS);
  131.             $form->handleRequest($request);
  132.             if ($form->isSubmitted() && $form->isValid()) {
  133.                 //$data = $form->getData();
  134.                 $data $request->request->all();
  135.                 $dataM $data['before_secure_contents_form'];
  136.                 $key $dataM['identifiantKey'];
  137.                 try {
  138.                     $keyDecrypt $this->es->decrypt($contentS->getIdentifiantKey(), $key);
  139.                     if ($keyDecrypt === "mirtillo") {
  140.                         $descriptionDecrypt "";
  141.                         if(!empty($contentS->getDescription())) {
  142.                             $descriptionDecrypt $this->es->decrypt($contentS->getDescription(), $key);
  143.                         }
  144.                         $descriptionContentDecrypt "";
  145.                         if(!empty($contentS->getDescriptionContent())) {
  146.                             $descriptionContentDecrypt $this->es->decrypt($contentS->getDescriptionContent(), $key);
  147.                         }
  148.                         $session->remove($attemptKey); // Réinitialisez le compteur en cas de succès
  149.                         return $this->render('themesWebsite/blog'.$themeSelection.'/secure/content.html.twig', [
  150.                             'content' => $contentS,
  151.                             'descriptionContent' => $descriptionContentDecrypt,
  152.                             'description' => $descriptionDecrypt
  153.                         ]);
  154.                     } else {
  155.                         throw new \Exception("Decryption failed");
  156.                     }
  157.                 } catch (\Exception $e) {
  158.                     // En cas d'échec, incrémentez le compteur
  159.                     $attempts++;
  160.                     $session->set($attemptKey$attempts);
  161.                     // Journalisation de l'échec
  162.                     $this->decryptionLogger->warning('Tentative de décryptage échouée', [
  163.                         'user_id' => $this->getUser() ? $this->getUser()->getId() : 'anonyme',
  164.                         'ip' => $request->getClientIp(),
  165.                         'folderslug' => $folderslug,
  166.                         'timestamp' => time(),
  167.                         'tentative' => $attempts
  168.                     ]);
  169.                 }
  170.                 return $this->redirectToRoute('pages_fiche', ['folderslug' => $folderslug]);
  171.             }
  172.             return $this->render('themesWebsite/blog'.$themeSelection.'/secure/key_content.html.twig', [
  173.                 'form' => $form->createView(),
  174.                 'content' => $contentS
  175.             ]);
  176.         }
  177.         // Contenu netlinking.
  178.         $content $this->em->getRepository(Contents::class)->findOneBy(['folderSlug' => $folderslug'status' => 'ONLINE']);
  179.         if($content) {
  180.             return $this->render('themesWebsite/blog'.$themeSelection.'/page_content.html.twig',[
  181.                 'page' => $content
  182.             ]);
  183.         }
  184.         $premiumContent $this->em->getRepository(Articles::class)->findOneBy(['folderSlug' => $folderslug'status' => 'ONLINE']);
  185.         if($premiumContent) {
  186.             $user $this->getUser();
  187.             $interactions $this->em->getRepository(Interactions::class)->getThread($premiumContent->getId(),$user);
  188.             $countInteractions $this->em->getRepository(Interactions::class)->countThreads($premiumContent->getId());
  189.             $questions $this->em->getRepository(Interactions::class)->getQuestions($premiumContent->getId());
  190.             $intObj = new Interactions();
  191.             $intObj->setUser($user);
  192.             $intObj->setArticle($premiumContent);
  193.             $intObj->setLocked(false);
  194.             // Interactions
  195.             $formInteractions $this->createForm(InteractionsForm::class,$intObj);
  196.             $formInteractions->handleRequest($request);
  197.             if ($formInteractions->isSubmitted() && $formInteractions->isValid()) {
  198.                 $this->em->persist($intObj);
  199.                 $this->em->flush();
  200.                 return $this->redirectToRoute('pages_fiche',['folderslug' => $folderslug]);
  201.             }
  202.             return $this->render('themesWebsite/blog'.$themeSelection.'/premium/content.html.twig',[
  203.                 'page' => $premiumContent,
  204.                 'fiche' => $premiumContent,
  205.                 'formInteractions' => $formInteractions->createView(),
  206.                 'interactions' => $interactions,
  207.                 'countInteractions' => $countInteractions,
  208.                 'questions' => $questions
  209.             ]);
  210.         }
  211.         $lang "fr";
  212.         $page $this->em->getRepository(Pages::class)->getPage($lang,$folderslug);
  213.         if(!$page) {
  214.             return $this->redirectToRoute('homepage');
  215.         }
  216.         $user $this->getUser();
  217.         if($user == null) {
  218.             if($page->getType() == "brouillon") {
  219.                 return $this->redirectToRoute('homepage');
  220.             }
  221.             if(!empty($page->getRedirect())) {
  222.                 return $this->redirect($page->getRedirect());
  223.             }
  224.         } else {
  225.             $grant $this->em->getRepository(Users::class)->userHasRole($user->getId(),"ROLE_SUPER_ADMIN");
  226.             if($grant == "0") {
  227.                 if($page->getType() == "brouillon") {
  228.                     return $this->redirectToRoute('homepage');
  229.                 }
  230.                 if(!empty($page->getRedirect())) {
  231.                     return $this->redirect($page->getRedirect());
  232.                 }
  233.             }
  234.         }
  235.         $blocks $this->em->getRepository(PagesHasBlocks::class)->findBy(['page' => $page'type' => 'prod''startPage' => false],['sequence' => 'ASC']);
  236.         $page->setViews((int)$page->getViews() + 1);
  237.         $this->em->persist($page);
  238.         $this->em->flush();
  239.         return $this->render('themesWebsite/blog'.$themeSelection.'/page.html.twig',[
  240.             'page' => $page,
  241.             'blocks' => $blocks
  242.         ]);
  243.     }
  244.     /**
  245.      * 2ème niveau
  246.      * @param Request $request
  247.      * @param $folderslug
  248.      * @param $folderslug2
  249.      * @return mixed
  250.      */
  251.     public function fiche2(Request $request$folderslug$folderslug2)
  252.     {
  253.         $themeSelection $_ENV['THEME_SELECTION'];
  254.         $content $this->em->getRepository(Contents::class)->findOneBy(['folderSlug' => $folderslug'folderSlug2' => $folderslug2'status' => 'ONLINE']);
  255.         if($content) {
  256.             return $this->render('themesWebsite/blog'.$themeSelection.'/page_content.html.twig',[
  257.                 'page' => $content
  258.             ]);
  259.         }
  260.         $premiumContent $this->em->getRepository(Articles::class)->findOneBy(['folderSlug' => $folderslug'folderSlug2' => $folderslug2'status' => 'ONLINE']);
  261.         if($premiumContent) {
  262.             $user $this->getUser();
  263.             $interactions $this->em->getRepository(Interactions::class)->getThread($premiumContent->getId(),$user);
  264.             $countInteractions $this->em->getRepository(Interactions::class)->countThreads($premiumContent->getId());
  265.             $questions $this->em->getRepository(Interactions::class)->getQuestions($premiumContent->getId());
  266.             $intObj = new Interactions();
  267.             $intObj->setUser($user);
  268.             $intObj->setArticle($premiumContent);
  269.             $intObj->setLocked(false);
  270.             // Interactions
  271.             $formInteractions $this->createForm(InteractionsForm::class,$intObj);
  272.             $formInteractions->handleRequest($request);
  273.             if ($formInteractions->isSubmitted() && $formInteractions->isValid()) {
  274.                 $this->em->persist($intObj);
  275.                 $this->em->flush();
  276.                 return $this->redirectToRoute('pages_fiche',['folderslug' => $folderslug]);
  277.             }
  278.             return $this->render('themesWebsite/blog'.$themeSelection.'/premium/content.html.twig',[
  279.                 'page' => $premiumContent,
  280.                 'fiche' => $premiumContent,
  281.                 'formInteractions' => $formInteractions->createView(),
  282.                 'interactions' => $interactions,
  283.                 'countInteractions' => $countInteractions,
  284.                 'questions' => $questions
  285.             ]);
  286.         }
  287.         $lang "fr";
  288.         $page $this->em->getRepository(Pages::class)->getPage($lang,$folderslug,$folderslug2);
  289.         if(!$page) {
  290.             return $this->redirectToRoute('homepage');
  291.         }
  292.         $user $this->getUser();
  293.         if($user == null) {
  294.             if($page->getType() == "brouillon") {
  295.                 return $this->redirectToRoute('homepage');
  296.             }
  297.             if(!empty($page->getRedirect())) {
  298.                 return $this->redirect($page->getRedirect());
  299.             }
  300.         } else {
  301.             $grant $this->em->getRepository(Users::class)->userHasRole($user->getId(),"ROLE_SUPER_ADMIN");
  302.             if($grant == "0") {
  303.                 if($page->getType() == "brouillon") {
  304.                     return $this->redirectToRoute('homepage');
  305.                 }
  306.                 if(!empty($page->getRedirect())) {
  307.                     return $this->redirect($page->getRedirect());
  308.                 }
  309.             }
  310.         }
  311.         $blocks $this->em->getRepository(PagesHasBlocks::class)->findBy(['page' => $page'type' => 'prod''startPage' => false],['sequence' => 'ASC']);
  312.         $page->setViews((int)$page->getViews() + 1);
  313.         $this->em->persist($page);
  314.         $this->em->flush();
  315.         return $this->render('themesWebsite/blog'.$themeSelection.'/page.html.twig',[
  316.             'page' => $page,
  317.             'blocks' => $blocks
  318.         ]);
  319.     }
  320.     /**
  321.      * 3ème niveau
  322.      * @param Request $request
  323.      * @param $folderslug
  324.      * @param $folderslug2
  325.      * @param $folderslug3
  326.      * @return mixed
  327.      */
  328.     public function fiche3(Request $request$folderslug$folderslug2$folderslug3)
  329.     {
  330.         $themeSelection $_ENV['THEME_SELECTION'];
  331.         $content $this->em->getRepository(Contents::class)->findOneBy(['folderSlug' => $folderslug'folderSlug2' => $folderslug2'folderSlug3' => $folderslug3'status' => 'ONLINE']);
  332.         if($content) {
  333.             return $this->render('themesWebsite/blog'.$themeSelection.'/page_content.html.twig',[
  334.                 'page' => $content
  335.             ]);
  336.         }
  337.         $premiumContent $this->em->getRepository(Articles::class)->findOneBy(['folderSlug' => $folderslug'folderSlug2' => $folderslug2'folderSlug3' => $folderslug3'status' => 'ONLINE']);
  338.         if($premiumContent) {
  339.             $user $this->getUser();
  340.             $interactions $this->em->getRepository(Interactions::class)->getThread($premiumContent->getId(),$user);
  341.             $countInteractions $this->em->getRepository(Interactions::class)->countThreads($premiumContent->getId());
  342.             $questions $this->em->getRepository(Interactions::class)->getQuestions($premiumContent->getId());
  343.             $intObj = new Interactions();
  344.             $intObj->setUser($user);
  345.             $intObj->setArticle($premiumContent);
  346.             $intObj->setLocked(false);
  347.             // Interactions
  348.             $formInteractions $this->createForm(InteractionsForm::class,$intObj);
  349.             $formInteractions->handleRequest($request);
  350.             if ($formInteractions->isSubmitted() && $formInteractions->isValid()) {
  351.                 $this->em->persist($intObj);
  352.                 $this->em->flush();
  353.                 return $this->redirectToRoute('pages_fiche',['folderslug' => $folderslug]);
  354.             }
  355.             return $this->render('themesWebsite/blog'.$themeSelection.'/premium/content.html.twig',[
  356.                 'page' => $premiumContent,
  357.                 'fiche' => $premiumContent,
  358.                 'formInteractions' => $formInteractions->createView(),
  359.                 'interactions' => $interactions,
  360.                 'countInteractions' => $countInteractions,
  361.                 'questions' => $questions
  362.             ]);
  363.         }
  364.         $lang "fr";
  365.         $page $this->em->getRepository(Pages::class)->getPage($lang,$folderslug,$folderslug2,$folderslug3);
  366.         if(!$page) {
  367.             return $this->redirectToRoute('homepage');
  368.         }
  369.         $user $this->getUser();
  370.         if($user == null) {
  371.             if($page->getType() == "brouillon") {
  372.                 return $this->redirectToRoute('homepage');
  373.             }
  374.             if(!empty($page->getRedirect())) {
  375.                 return $this->redirect($page->getRedirect());
  376.             }
  377.         } else {
  378.             $grant $this->em->getRepository(Users::class)->userHasRole($user->getId(),"ROLE_SUPER_ADMIN");
  379.             if($grant == "0") {
  380.                 if($page->getType() == "brouillon") {
  381.                     return $this->redirectToRoute('homepage');
  382.                 }
  383.                 if(!empty($page->getRedirect())) {
  384.                     return $this->redirect($page->getRedirect());
  385.                 }
  386.             }
  387.         }
  388.         $blocks $this->em->getRepository(PagesHasBlocks::class)->findBy(['page' => $page'type' => 'prod''startPage' => false],['sequence' => 'ASC']);
  389.         $page->setViews((int)$page->getViews() + 1);
  390.         $this->em->persist($page);
  391.         $this->em->flush();
  392.         return $this->render('themesWebsite/blog'.$themeSelection.'/page.html.twig',[
  393.             'page' => $page,
  394.             'blocks' => $blocks
  395.         ]);
  396.     }
  397.     /**
  398.      * Redirection vers la page cible de la fiche
  399.      * @param Request $request
  400.      * @param Articles $fiche
  401.      * @param Pages $page
  402.      * @return mixed
  403.      */
  404.     public function redirFiche(Request $requestArticles $fiche)
  405.     {
  406.         $folderslug $fiche->getFolderSlug();
  407.         $folderslug2 $fiche->getFolderSlug2();
  408.         $folderslug3 $fiche->getFolderSlug3();
  409.         if(!empty($folderslug) and !empty($folderslug2) and !empty($folderslug3)) {
  410.             return $this->redirectToRoute('pages_fiche3',['folderslug' => $folderslug'folderslug2' => $folderslug2'folderslug3' => $folderslug3]);
  411.         } elseif(!empty($folderslug) and !empty($folderslug2) and empty($folderslug3)) {
  412.             return $this->redirectToRoute('pages_fiche2',['folderslug' => $folderslug'folderslug2' => $folderslug2]);
  413.         } elseif(!empty($folderslug) and empty($folderslug2) and empty($folderslug3)) {
  414.             return $this->redirectToRoute('pages_fiche',['folderslug' => $folderslug]);
  415.         }
  416.         return $this->redirectToRoute('homepage');
  417.     }
  418.     /**
  419.      * Interactions
  420.      * @param Request $request
  421.      * @param Articles $fiche
  422.      * @param Pages $page
  423.      * @param Interactions $interaction
  424.      * @return mixed
  425.      */
  426.     public function interactions(Request $requestArticles $ficheInteractions $interaction)
  427.     {
  428.         $themeSelection $_ENV['THEME_SELECTION'];
  429.         $user $this->getUser();
  430.         $role $this->us->hasRoles($user->getRoles(), "ROLE_SUPER_ADMIN");
  431.         // Vérification si l'utilisateur et privée
  432.         if($interaction->getPersonal() == true) {
  433.             // Vérification si l'utilisateur admin
  434.             if ($role === false) {
  435.                 // Vérification de l'utilisateur du post
  436.                 if($interaction->getUser() != $user) {
  437.                     die('ici');
  438.                     return $this->redirectToRoute('homepage');
  439.                 }
  440.             }
  441.         }
  442.         $interactions $this->em->getRepository(Interactions::class)->findBy(['interaction' => $interaction],['createdAt' => 'ASC']);
  443.         $intObj = new Interactions();
  444.         $intObj->setUser($user);
  445.         $intObj->setArticle($fiche);
  446.         $intObj->setLocked(false);
  447.         $intObj->setPersonal($interaction->getPersonal());
  448.         $intObj->setInteraction($interaction);
  449.         $form $this->createForm(InteractionsSimpleForm::class,$intObj);
  450.         if ($role == true) {
  451.             $form $this->createForm(InteractionsAdminForm::class,$intObj);
  452.         }
  453.         $form->handleRequest($request);
  454.         if ($form->isSubmitted() && $form->isValid()) {
  455.             $this->em->persist($intObj);
  456.             $this->em->flush();
  457.             return $this->redirectToRoute('pages_interactions',['fiche' => $fiche->getId(),'interaction' => $interaction->getId()]);
  458.         }
  459.         return $this->render('themesWebsite/blog'.$themeSelection.'/premium/interactions.html.twig',[
  460.             'page' => $fiche,
  461.             'fiche' => $fiche,
  462.             'subject' => $interaction,
  463.             'interactions' => $interactions,
  464.             'formInteractions' => $form->createView(),
  465.         ]);
  466.     }
  467.     /**
  468.      * ADMIN - Modifier une interaction
  469.      * @param Request $request
  470.      * @param Articles $fiche
  471.      * @param Pages $page
  472.      * @param Interactions $interaction
  473.      * @return mixed
  474.      */
  475.     public function editInteraction(Request $requestArticles $ficheInteractions $interaction)
  476.     {
  477.         $themeSelection $_ENV['THEME_SELECTION'];
  478.         $user $this->getUser();
  479.         $role $this->us->hasRoles($user->getRoles(), "ROLE_SUPER_ADMIN");
  480.         if ($role != true) {
  481.             return $this->redirectToRoute('homepage');
  482.         }
  483.         $form $this->createForm(InteractionsAdminForm::class,$interaction);
  484.         $form->handleRequest($request);
  485.         if ($form->isSubmitted() && $form->isValid()) {
  486.             $this->em->persist($interaction);
  487.             $this->em->flush();
  488.             return $this->redirectToRoute('pages_interactions',['fiche' => $fiche->getId(),'interaction' => $interaction->getId()]);
  489.         }
  490.         return $this->render('themesWebsite/blog'.$themeSelection.'/premium/edit_interaction.html.twig',[
  491.             'page' => $fiche,
  492.             'fiche' => $fiche,
  493.             'interaction' => $interaction,
  494.             'formInteractions' => $form->createView(),
  495.         ]);
  496.     }
  497. }