src/Controller/VitrineController.php line 63
<?php
namespace App\Controller;
use App\Entity\Role;
use App\Service\Services;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class VitrineController extends AbstractController
{
public function __construct(private Services $src, private EntityManagerInterface $em)
{}
#[Route('')]
#[Route('/{_locale}', name: 'filmafrik')]
#[Route('/{_locale}/home', name: 'web_vitrine')]
public function home(Request $request): Response
{
return $this->render('vitrine/index.html.twig');
}
#[Route('/{_locale}/movie_detail', name: 'web_movie_detail')]
public function movieDetail(Request $request): Response
{
return $this->render('vitrine/movie-detail.html.twig');
}
#[Route('/{_locale}/casting_detail', name: 'web_casting_detail')]
public function castingDetail(Request $request): Response
{
return $this->render('vitrine/casting-detail.html.twig');
}
#[Route('/{_locale}/view-all-casting', name: 'web_view_all_casting')]
public function viewAllCasting(Request $request): Response
{
return $this->render('vitrine/view-all-casting.html.twig');
}
#[Route('/{_locale}/view-all-movie', name: 'web_view_all_movie')]
public function viewAllMovie(Request $request): Response
{
return $this->render('vitrine/view-all-movie.html.twig');
}
#[Route('/{_locale}/view-all-serie', name: 'web_view_all_serie')]
public function viewAllSerie(Request $request): Response
{
return $this->render('vitrine/view-all-serie.html.twig');
}
#[Route('/{_locale}/catalog', name: 'web_catalog')]
public function catalog(Request $request): Response
{
return $this->render('vitrine/catalog.html.twig');
}
#[Route('/{_locale}/faq', name: 'web_faq')]
public function faq(Request $request): Response
{
return $this->render('vitrine/faq.html.twig');
}
#[Route('/{_locale}/contact', name: 'web_contact')]
public function contact(Request $request): Response
{
return $this->render('vitrine/contact.html.twig');
}
#[Route('/contact/send', name: 'web_contact_send')]
public function send(Request $request): Response
{
$email = $request->request->get('email');
$phone = $request->request->get('phone');
$object = $request->request->get('object');
$message = $request->request->get('message');
$fullName = $request->request->get('fullName');
$template = 'emails/emailContact.html.twig';
$data = [
'text'=>"Message contact envoyé"
];
$info = "";
$this->src->sendMail($email, $object, $template, $data);
dd($email);
$status = "success";
return $this->json([
"status" => $status,
"message" => $message,
"data" => $info,
]);
}
#[Route('/{_locale}/pricing', name: 'web_pricing')]
public function pricing(Request $request): Response
{
return $this->render('vitrine/pricing-plan.html.twig');
}
#[Route('/{_locale}/account', name: 'web_account')]
public function account(Request $request): Response
{
return $this->render('vitrine/account.html.twig');
}
#[Route('/{_locale}/terms', name: 'web_terms_of_us')]
public function terms(Request $request): Response
{
return $this->render('vitrine/terms-of-us.html.twig');
}
#[Route('/{_locale}/privacy_policy', name: 'web_privacy_policy')]
public function privacyPolicy(Request $request): Response
{
return $this->render('vitrine/privacy-policy.html.twig');
}
#[Route('/{_locale}/top_trending', name: 'web_top_trending')]
public function topTrending(Request $request): Response
{
return $this->render('vitrine/top-trending.html.twig');
}
#[Route('/{_locale}/live', name: 'web_live')]
public function live(Request $request): Response
{
return $this->render('vitrine/live.html.twig');
}
#[Route('/{_locale}/person-detail', name: 'web_person_detail')]
public function personDetail(Request $request): Response
{
return $this->render('vitrine/person-detail.html.twig');
}
#[Route('/{_locale}/all-personality', name: 'web_all_personality')]
public function allPersonality(Request $request): Response
{
return $this->render('vitrine/all-personality.html.twig');
}
#[Route('/{_locale}/genres', name: 'web_genres')]
public function genres(Request $request): Response
{
return $this->render('vitrine/genres.html.twig');
}
#[Route('/{_locale}/season', name: 'web_season')]
public function season(Request $request): Response
{
return $this->render('vitrine/season.html.twig');
}
#[Route('/{_locale}/episode', name: 'web_episode')]
public function episode(Request $request): Response
{
return $this->render('vitrine/episode.html.twig');
}
#[Route('/{_locale}/series_detail', name: 'web_series_detail')]
public function seriesDetail(Request $request): Response
{
return $this->render('vitrine/series-detail.html.twig');
}
}