src/Controller/Front/HelpFaqController.php line 27

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Front;
  3. use App\Entity\{HelpFaqFaqCategory};
  4. use App\Service\AccessClientService;
  5. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  6. use Symfony\Component\HttpFoundation\Request;
  7. use Symfony\Component\HttpFoundation\Response;
  8. use Symfony\Component\Routing\Annotation\Route;
  9. use Doctrine\ORM\EntityManagerInterface;
  10. class HelpFaqController extends AbstractController
  11. {
  12.     /**
  13.      * @Route("/help-faq", name="app_front_help_faq")
  14.      */
  15.     public function helpFAQ(AccessClientService $accessClientServiceEntityManagerInterface $entityManager): Response
  16.     {
  17.         $accessClientService->handleAccessControl();
  18.         
  19.         $help $entityManager->getRepository(Help::class)->findOneBy([], ['id' => 'DESC']);
  20.         $faqCategory $entityManager->getRepository(FaqCategory::class)->findBy([], ['id' => 'ASC']);
  21.         return $this->render('front/help_faq/help_faq.html.twig', [
  22.             'help' => $help,
  23.             'faqCategory' => $faqCategory
  24.         ]);
  25.     }
  26. }