src/Controller/AboutusController.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\Images;
  4. use App\Entity\Ourteam;
  5. use App\Entity\Texts;
  6. use Doctrine\Persistence\ManagerRegistry;
  7. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  8. use Symfony\Component\HttpFoundation\Response;
  9. use Symfony\Component\Routing\Annotation\Route;
  10. class AboutusController extends AbstractController
  11. {
  12.     /**
  13.      * @Route("/sobre-nos", name="app_aboutus")
  14.      */
  15.     public function index(ManagerRegistry $doctrine): Response
  16.     {
  17.         $ourTeam = $doctrine->getRepository(Ourteam::class)->findAll();
  18.         $banner = $doctrine->getRepository(Images::class)->findOneBy(['type' => 'banner2']);
  19.         $images = $doctrine->getRepository(Images::class)->findAll();
  20.         $texts = $doctrine->getRepository(Texts::class)->find(3);
  21.         return $this->render('aboutus/index.html.twig', [
  22.             'titlePage' => 'Sobre Nós',
  23.             'teams' => $ourTeam,
  24.             'banner' => $banner,
  25.             'images' => $images,
  26.             'texts' => $texts
  27.         ]);
  28.     }
  29. }