<?php

namespace App\Controller\Frontend;

use App\Controller\AbstractController;
use App\Repository\Site\BlockStore;
use Doctrine\ORM\EntityManagerInterface;

class AboutController extends AbstractController
{
    protected BlockStore $blockStore;

    public function __construct(
        EntityManagerInterface $em,
        BlockStore $blockStore
    ) {
        $this->blockStore = $blockStore;
        parent::__construct($em);
    }

    public function about()
    {
        $blockStartUp = $this->blockStore->getOneOnlineByDevAlias('about-startup');
        $blockStep1 = $this->blockStore->getOneOnlineByDevAlias('about-step1');
        $blockStep2 = $this->blockStore->getOneOnlineByDevAlias('about-step2');
        $blockStep3 = $this->blockStore->getOneOnlineByDevAlias('about-step3');
        $blockLabourage = $this->blockStore->getOneOnlineByDevAlias('about-labourage');
        $blockRecolt = $this->blockStore->getOneOnlineByDevAlias('about-recolt');
        $blockAccompagnement = $this->blockStore->getOneOnlineByDevAlias('about-accompagnement');
        $blockDemarche = $this->blockStore->getOneOnlineByDevAlias('about-demarche');
        $blockCoeur = $this->blockStore->getOneOnlineByDevAlias('about-coeur');

        return $this->render('frontend/about.html.twig', [
            'blockStartUp' => $blockStartUp,
            'blockStep1' => $blockStep1,
            'blockStep2' => $blockStep2,
            'blockStep3' => $blockStep3,
            'blockLabourage' => $blockLabourage,
            'blockRecolt' => $blockRecolt,
            'blockAccompagnement' => $blockAccompagnement,
            'blockDemarche' => $blockDemarche,
            'blockCoeur' => $blockCoeur,
        ]);
    }
}