src/Controller/StaticController.php line 29

Open in your IDE?
  1. <?php
  2. // scr/Controller/StaticController.php
  3. namespace App\Controller;
  4. use App\Service\Images\ImagesService;
  5. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  6. use Symfony\Component\HttpFoundation\Response;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. /**
  9.  * FrontEnd Controllers
  10.  */
  11. class StaticController extends AbstractController
  12. {
  13.     /**
  14.      * @Route("/", name="main")
  15.      * @param ImagesService $imgService
  16.      * @return Response
  17.      */
  18.     public function showMain(ImagesService $imgService): Response
  19.     {
  20.         $images $imgService->imagesArrayFromDirectory('bundles/app/frontend/images/portada/');
  21.         return $this->render("frontend/home/index.html.twig", ['images' => $images]);
  22.     }
  23.     /**
  24.      * @Route("/training", name="training")
  25.      * @return Response
  26.      */
  27.     public function showDevelopment(): Response
  28.     {
  29.         return $this->render("frontend/training/index.html.twig");
  30.     }
  31.     /**
  32.      * @Route("/presential", name="presential")
  33.      * @return Response
  34.      */
  35.     public function showMarketing(): Response
  36.     {
  37.         return $this->render("frontend/presential/index.html.twig");
  38.     }
  39.     /**
  40.      * @Route("/online", name="online")
  41.      * @return Response
  42.      */
  43.     public function showEcommerce(): Response
  44.     {
  45.         return $this->render("frontend/online/index.html.twig");
  46.     }
  47.     /**
  48.      * @Route("/consulting", name="consulting")
  49.      * @return Response
  50.      */
  51.     public function showConsulting(): Response
  52.     {
  53.         return $this->render("frontend/consulting/index.html.twig");
  54.     }
  55.     /**
  56.      * @Route("/formations", name="formations")
  57.      * @return Response
  58.      */
  59.     public function showFormations(): Response
  60.     {
  61.         return $this->render("frontend/formations/index.html.twig");
  62.     }
  63.     /**
  64.      * @Route("/team", name="team")
  65.      * @return Response
  66.      */
  67.     public function showTeam(): Response
  68.     {
  69.         return $this->render("frontend/team/index.html.twig");
  70.     }
  71.     /**
  72.      * @Route("/kitdigital", name="kitdigital")
  73.      * @return Response
  74.      */
  75.     public function showKitdigital(): Response
  76.     {
  77.         return $this->render("frontend/kitdigital/index.html.twig");
  78.     }
  79.     /**
  80.      * ("/contact", name="contact")
  81.      * @return Response
  82.      */
  83.     public function showContact(): Response
  84.     {
  85.         return $this->render("frontend/contact/index.html.twig");
  86.     }
  87.     /**
  88.      * @Route("/warning", name="warning")
  89.      * @return Response
  90.      */
  91.     public function showWarning(): Response
  92.     {
  93.         return $this->render("frontend/warning/index.html.twig");
  94.     }
  95. }