src/Controller/AboutController.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Repository\AboutRepository;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. class AboutController extends AbstractController
  8. {
  9.     /**
  10.      * @Route({
  11.      *     "fr": "/fr/qui-nous-sommes",
  12.      *     "en": "/en/about-us"
  13.      * }, name="app_about_index")
  14.      */
  15.     public function index(AboutRepository $aboutRepository): Response
  16.     {
  17.         $about = $aboutRepository->findAboutPostByTag('about_index');
  18.         $value = $aboutRepository->findAboutPostByTag('value_index');
  19.         $force = $aboutRepository->findAboutPostByTag('forces_index');
  20.         return $this->render('about/index.html.twig', [
  21.             'abouts' => $about,
  22.             'values' => $value,
  23.             'forces' => $force
  24.         ]);
  25.     }
  26. }