<?php

namespace App\Controller\Frontend;


use App\Controller\AbstractController;
use App\Entity\Site\Page;
use Symfony\Component\HttpFoundation\Response;

class PageController extends AbstractController
{
    public function mention(): Response
    {
        $pageRepository = $this->em->getRepository(Page::class);

        return $this->render(
            'page/page.html.twig',
            [
                'page' => $pageRepository->findOneByDevAlias('legal-mention')
            ]
        );
    }

    public function politique(): Response
    {
        $pageRepository = $this->em->getRepository(Page::class);

        return $this->render(
            'page/page.html.twig',
            [
                'page' => $pageRepository->findOneByDevAlias('politique')
            ]
        );
    }
}