<?php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use App\Repository\Pointage\HeureAgentRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class DefaultController extends AbstractController
{
/**
* @Route("/", name="accueil")
*/
public function index(HeureAgentRepository $heureAgentRepository): Response
{
$date = new \DateTime();
$date->setTimezone(new \DateTimeZone('Pacific/Chatham'));
$mois = $date->format("m");
$annee = $date->format("Y");
$heuresAgent = $heureAgentRepository->getInformations("", $mois, $annee);
return $this->render('main/index.html.twig', [
'heuresAgent' => $heuresAgent,
'mois' => $mois,
'annee' => $annee,
]);
}
}