src/Controller/VitrineController.php line 21

  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\Role;
  4. use App\Service\Services;
  5. use Doctrine\ORM\EntityManagerInterface;
  6. use Symfony\Component\HttpFoundation\Request;
  7. use Symfony\Component\HttpFoundation\Response;
  8. use Symfony\Component\Routing\Annotation\Route;
  9. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  10. class VitrineController extends AbstractController
  11. {
  12.     public function __construct(private Services $src, private EntityManagerInterface $em)
  13.     {}
  14.     #[Route('')]
  15.     #[Route('/{_locale}'name'filmafrik')]
  16.     #[Route('/{_locale}/home'name'web_vitrine')]
  17.     public function home(Request $request): Response
  18.     {
  19.         return $this->render('vitrine/index.html.twig');
  20.     }
  21.     #[Route('/{_locale}/movie_detail'name'web_movie_detail')]
  22.     public function movieDetail(Request $request): Response
  23.     {
  24.         return $this->render('vitrine/movie-detail.html.twig');
  25.     }
  26.     #[Route('/{_locale}/casting_detail'name'web_casting_detail')]
  27.     public function castingDetail(Request $request): Response
  28.     {
  29.         return $this->render('vitrine/casting-detail.html.twig');
  30.     }
  31.     #[Route('/{_locale}/view-all-casting'name'web_view_all_casting')]
  32.     public function viewAllCasting(Request $request): Response
  33.     {
  34.         return $this->render('vitrine/view-all-casting.html.twig');
  35.     }
  36.     #[Route('/{_locale}/view-all-movie'name'web_view_all_movie')]
  37.     public function viewAllMovie(Request $request): Response
  38.     {
  39.         return $this->render('vitrine/view-all-movie.html.twig');
  40.     }
  41.     #[Route('/{_locale}/view-all-serie'name'web_view_all_serie')]
  42.     public function viewAllSerie(Request $request): Response
  43.     {
  44.         return $this->render('vitrine/view-all-serie.html.twig');
  45.     }
  46.     #[Route('/{_locale}/catalog'name'web_catalog')]
  47.     public function catalog(Request $request): Response
  48.     {
  49.         return $this->render('vitrine/catalog.html.twig');
  50.     }
  51.     #[Route('/{_locale}/faq'name'web_faq')]
  52.     public function faq(Request $request): Response
  53.     {
  54.         return $this->render('vitrine/faq.html.twig');
  55.     }
  56.     #[Route('/{_locale}/contact'name'web_contact')]
  57.     public function contact(Request $request): Response
  58.     {
  59.         return $this->render('vitrine/contact.html.twig');
  60.     }
  61.     #[Route('/contact/send'name'web_contact_send')]
  62.     public function send(Request $request): Response
  63.     {
  64.         $email      $request->request->get('email');
  65.         $phone      $request->request->get('phone');
  66.         $object     $request->request->get('object');
  67.         $message    $request->request->get('message');
  68.         $fullName   $request->request->get('fullName');
  69.         $template   'emails/emailContact.html.twig';
  70.         $data       = [
  71.             'text'=>"Message contact envoyé"
  72.         ];
  73.         $info       "";
  74.         $this->src->sendMail($email$object$template$data);
  75.         dd($email);
  76.         $status "success";
  77.         return $this->json([
  78.             "status"    => $status,
  79.             "message"   => $message,
  80.             "data"        => $info,
  81.         ]);
  82.     }
  83.     #[Route('/{_locale}/pricing'name'web_pricing')]
  84.     public function pricing(Request $request): Response
  85.     {
  86.         return $this->render('vitrine/pricing-plan.html.twig');
  87.     }
  88.     #[Route('/{_locale}/account'name'web_account')]
  89.     public function account(Request $request): Response
  90.     {
  91.         return $this->render('vitrine/account.html.twig');
  92.     }
  93.     #[Route('/{_locale}/terms'name'web_terms_of_us')]
  94.     public function terms(Request $request): Response
  95.     {
  96.         return $this->render('vitrine/terms-of-us.html.twig');
  97.     }
  98.     #[Route('/{_locale}/privacy_policy'name'web_privacy_policy')]
  99.     public function privacyPolicy(Request $request): Response
  100.     {
  101.         return $this->render('vitrine/privacy-policy.html.twig');
  102.     }
  103.     #[Route('/{_locale}/top_trending'name'web_top_trending')]
  104.     public function topTrending(Request $request): Response
  105.     {
  106.         return $this->render('vitrine/top-trending.html.twig');
  107.     }
  108.     #[Route('/{_locale}/live'name'web_live')]
  109.     public function live(Request $request): Response
  110.     {
  111.         return $this->render('vitrine/live.html.twig');
  112.     }
  113.     #[Route('/{_locale}/person-detail'name'web_person_detail')]
  114.     public function personDetail(Request $request): Response
  115.     {
  116.         return $this->render('vitrine/person-detail.html.twig');
  117.     }
  118.     #[Route('/{_locale}/all-personality'name'web_all_personality')]
  119.     public function allPersonality(Request $request): Response
  120.     {
  121.         return $this->render('vitrine/all-personality.html.twig');
  122.     }
  123.     #[Route('/{_locale}/genres'name'web_genres')]
  124.     public function genres(Request $request): Response
  125.     {
  126.         return $this->render('vitrine/genres.html.twig');
  127.     }
  128.     #[Route('/{_locale}/season'name'web_season')]
  129.     public function season(Request $request): Response
  130.     {
  131.         return $this->render('vitrine/season.html.twig');
  132.     }
  133.     #[Route('/{_locale}/episode'name'web_episode')]
  134.     public function episode(Request $request): Response
  135.     {
  136.         return $this->render('vitrine/episode.html.twig');
  137.     }
  138.     #[Route('/{_locale}/series_detail'name'web_series_detail')]
  139.     public function seriesDetail(Request $request): Response
  140.     {
  141.         return $this->render('vitrine/series-detail.html.twig');
  142.     }
  143. }