|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace App\Controller\UI; |
| 4 | + |
| 5 | +use App\Entity\FundingCycle; |
| 6 | +use App\Entity\Person; |
| 7 | +use App\Entity\ResearchGroup; |
| 8 | +use App\Repository\InformationProductRepository; |
| 9 | +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; |
| 10 | +use Symfony\Component\HttpFoundation\Response; |
| 11 | +use Symfony\Component\Routing\Annotation\Route; |
| 12 | + |
| 13 | +class LandingController extends AbstractController |
| 14 | +{ |
| 15 | + #[Route('/funding-cycle/about/{fundingCycle}', name: 'app_funding_cycle_land')] |
| 16 | + public function fundingCycleLand(FundingCycle $fundingCycle, InformationProductRepository $informationProductRepository): Response |
| 17 | + { |
| 18 | + $informationProducts = $informationProductRepository->findByFundingCycle($fundingCycle); |
| 19 | + |
| 20 | + return $this->render( |
| 21 | + 'LandingPages/funding-cycle-land.html.twig', |
| 22 | + [ |
| 23 | + 'fundingCycle' => $fundingCycle, |
| 24 | + 'informationProducts' => $informationProducts, |
| 25 | + ] |
| 26 | + ); |
| 27 | + } |
| 28 | + |
| 29 | + #[Route('/person/about/{person}', name: 'app_person_land')] |
| 30 | + public function personLand(Person $person, InformationProductRepository $informationProductRepository): Response |
| 31 | + { |
| 32 | + |
| 33 | + $informationProducts = $informationProductRepository->findByPerson($person); |
| 34 | + |
| 35 | + return $this->render( |
| 36 | + 'LandingPages/person-land.html.twig', |
| 37 | + [ |
| 38 | + 'person' => $person, |
| 39 | + 'informationProducts' => $informationProducts, |
| 40 | + ] |
| 41 | + ); |
| 42 | + } |
| 43 | + |
| 44 | + #[Route('/research-group/about/{researchGroup}', name: 'pelagos_app_ui_researchgroup_about')] |
| 45 | + public function researchGroupLand(ResearchGroup $researchGroup, InformationProductRepository $informationProductRepository): Response |
| 46 | + { |
| 47 | + |
| 48 | + $informationProducts = $informationProductRepository->findOneByResearchGroupId($researchGroup->getId()); |
| 49 | + |
| 50 | + return $this->render( |
| 51 | + 'LandingPages/research-group-land.html.twig', |
| 52 | + [ |
| 53 | + 'researchGroup' => $researchGroup, |
| 54 | + 'informationProducts' => $informationProducts, |
| 55 | + ] |
| 56 | + ); |
| 57 | + } |
| 58 | +} |
0 commit comments