<?php
namespace App\Controller\Www;

use App\Services\SettingsService;
use App\Entity\Event;
use App\Entity\Setting;
use App\Entity\Sponsor;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

#[Route(name: "www_")]
class DiversController extends AbstractController
{
    #[Route("/l-art-du-collectif", name: "l_art_du_collectif")]
    #[Route("/contact",            name: "contact")]
    public function whoarewe(EntityManagerInterface $manager)
    {
        $partners = $manager->getRepository(Sponsor::class)->findAllActive(true, false);
        $sponsors = $manager->getRepository(Sponsor::class)->findAllActive(false, true);

        return $this->render("www/whoarewe.html.twig",
            [
                "partners" => $partners,
                "sponsors" => $sponsors
            ]
        );
    }

    #[Route("/mentions-legales", name: "legal")] 
    public function legal(EntityManagerInterface $manager)
    {
        return $this->render("www/legal.html.twig");
    }

}