You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
963B

  1. <?php
  2. namespace App\Controller\Frontend;
  3. use App\Controller\AbstractController;
  4. use App\Repository\Site\BlockStore;
  5. use Doctrine\ORM\EntityManagerInterface;
  6. class HomeController extends AbstractController
  7. {
  8. protected BlockStore $blockStore;
  9. public function __construct(
  10. EntityManagerInterface $em,
  11. BlockStore $blockStore
  12. ) {
  13. $this->blockStore = $blockStore;
  14. parent::__construct($em);
  15. }
  16. public function home()
  17. {
  18. $blockCarto = $this->blockStore->getOneOnlineByDevAlias('home-carto');
  19. $blockPlanisphere = $this->blockStore->getOneOnlineByDevAlias('home-planisphere');
  20. $blockRessourcerie = $this->blockStore->getOneOnlineByDevAlias('home-ressourcerie');
  21. return $this->render('frontend/home.html.twig', [
  22. 'blockCarto' => $blockCarto,
  23. 'blockPlanisphere' => $blockPlanisphere,
  24. 'blockRessourcerie' => $blockRessourcerie,
  25. ]);
  26. }
  27. }