src/Controller/Front/investigation/OfficeController.php line 31

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Front\investigation;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\Routing\Annotation\Route;
  5. use Symfony\Contracts\HttpClient\HttpClientInterface;
  6. use Symfony\Component\HttpFoundation\Request;
  7. use App\Repository\PageRepository;
  8. use App\Repository\SectionRepository;
  9. use App\Repository\InvestigationSeminarRepository;
  10. class OfficeController extends AbstractController
  11. {
  12.     /**
  13.      * @Route("/investigacion/oficina-de-promocion-de-la-investigacion/presentacion")
  14.      */
  15.     public function presentation(Request $request,PageRepository $pageRepositorySectionRepository $sectionRepository)
  16.     {
  17.         $page $pageRepository->findOneBy(["slug"=>"investigacion/oficina-de-promocion-de-la-investigacion/presentacion"],[]);
  18.         $content $sectionRepository->findBy(["page"=>$page->getId()], ["customOrder"=>"ASC"]);
  19.   
  20.         return $this->render('front/investigation/office/presentation.html.twig', ["content" => $content]);
  21.     }
  22.     /**
  23.      * @Route("/investigacion/oficina-de-promocion-de-la-investigacion/seminarios-de-investigacion-cud")
  24.      */
  25.     public function investigationSeminar(Request $request,PageRepository $pageRepositorySectionRepository $sectionRepositoryInvestigationSeminarRepository $investigationSeminarRepository)
  26.     {
  27.         $page $pageRepository->findOneBy(["slug"=>"investigacion/oficina-de-promocion-de-la-investigacion/seminarios-de-investigacion-cud"],[]);
  28.         $content $sectionRepository->findBy(["page"=>$page->getId()], ["customOrder"=>"ASC"]);
  29.         $investigations=$investigationSeminarRepository->findBy([], ["id"=>"DESC"]);
  30.         return $this->render('front/investigation/office/investigationSeminar.html.twig', ["content" => $content"investigations" => $investigations]);
  31.     }
  32.     /**
  33.      * @Route("/investigacion/oficina-de-promocion-de-la-investigacion/congresos")
  34.      */
  35.     public function congresses(Request $request,PageRepository $pageRepositorySectionRepository $sectionRepository)
  36.     {
  37.         $page $pageRepository->findOneBy(["slug"=>"investigacion/oficina-de-promocion-de-la-investigacion/congresos"],[]);
  38.         $content $sectionRepository->findBy(["page"=>$page->getId()], ["customOrder"=>"ASC"]);
  39.   
  40.         return $this->render('front/investigation/office/congresses.html.twig', ["content" => $content]);
  41.     }
  42. }