src/Controller/AppController.php line 52

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\Response;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. use Symfony\Component\HttpFoundation\Request;
  7. use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
  8. use Doctrine\ORM\EntityManagerInterface;
  9. use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
  10. use Symfony\Component\HttpFoundation\JsonResponse;
  11. use Symfony\Component\HttpFoundation\File\Exception\FileException;
  12. use Symfony\Component\HttpFoundation\File\UploadedFile;
  13. use Symfony\Component\String\Slugger\SluggerInterface;
  14. use Symfony\Component\DependencyInjection\ContainerInterface;
  15. use Doctrine\Common\Collections\ArrayCollection;
  16. use Symfony\Contracts\Translation\TranslatorInterface;
  17. use App\Entity\User;
  18. use App\Entity\FileSend;
  19. use App\Entity\UserZone;
  20. use App\Entity\Zone;
  21. use App\Entity\Product;
  22. use App\Entity\ProductType;
  23. use App\Entity\Ingredient;
  24. use App\Entity\Method;
  25. use App\Entity\MethodStep;
  26. use App\Entity\Recipe;
  27. use App\Entity\Garnish;
  28. use App\Entity\RecipeMethodStep;
  29. use App\Entity\RecipeProductIngredient;
  30. use App\Services\RoleService;
  31. use App\Services\FileUploader;
  32. use App\Services\Utils;
  33. /**
  34.  * @Route("/")
  35.  */
  36. class AppController extends AbstractController
  37. {
  38.     protected $em;
  39.     protected $fileUploader;
  40.     protected $utils;
  41.     public function __construct(EntityManagerInterface $entityManagerFileUploader $fileUploaderUtils $utilsTranslatorInterface $translatorRoleService $roleService) {
  42.         $this->em $entityManager;
  43.         $this->fileUploader $fileUploader;
  44.         $this->utils $utils;
  45.         $this->translator $translator;
  46.         $this->roleService $roleService;
  47.     }
  48.     /**
  49.      * @Route("/", name="home")
  50.      */
  51.     public function home(): Response
  52.     {
  53.         //if ($this->getUser()) {
  54.             return $this->redirectToRoute('app_login');
  55.         //}
  56.     }
  57.     /**
  58.      * @Route("/politique-de-confidentialite", name="confidentialite")
  59.      */
  60.     public function confidentialite()
  61.     {
  62.         return $this->render('app/confidentialite.html.twig', [
  63.         ]);
  64.     }
  65.     /**
  66.      * @Route("/conditions-generales-d-utilisation", name="condition_generales_utilisation")
  67.      */
  68.     public function conditionGeneralesUtilisation()
  69.     {
  70.         return $this->render('app/conditionGeneralesUtilisation.html.twig', [
  71.         ]);
  72.     }
  73. }