<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\File\Exception\FileException;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\String\Slugger\SluggerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Contracts\Translation\TranslatorInterface;
use App\Entity\User;
use App\Entity\FileSend;
use App\Entity\UserZone;
use App\Entity\Zone;
use App\Entity\Product;
use App\Entity\ProductType;
use App\Entity\Ingredient;
use App\Entity\Method;
use App\Entity\MethodStep;
use App\Entity\Recipe;
use App\Entity\Garnish;
use App\Entity\RecipeMethodStep;
use App\Entity\RecipeProductIngredient;
use App\Services\RoleService;
use App\Services\FileUploader;
use App\Services\Utils;
/**
* @Route("/")
*/
class AppController extends AbstractController
{
protected $em;
protected $fileUploader;
protected $utils;
public function __construct(EntityManagerInterface $entityManager, FileUploader $fileUploader, Utils $utils, TranslatorInterface $translator, RoleService $roleService) {
$this->em = $entityManager;
$this->fileUploader = $fileUploader;
$this->utils = $utils;
$this->translator = $translator;
$this->roleService = $roleService;
}
/**
* @Route("/", name="home")
*/
public function home(): Response
{
//if ($this->getUser()) {
return $this->redirectToRoute('app_login');
//}
}
/**
* @Route("/politique-de-confidentialite", name="confidentialite")
*/
public function confidentialite()
{
return $this->render('app/confidentialite.html.twig', [
]);
}
/**
* @Route("/conditions-generales-d-utilisation", name="condition_generales_utilisation")
*/
public function conditionGeneralesUtilisation()
{
return $this->render('app/conditionGeneralesUtilisation.html.twig', [
]);
}
}