src/Controller/ConditionsUtilisationsController.php line 19
<?php
namespace App\Controller;
use App\Entity\ConditionsUtilisations;
use App\Form\ConditionsUtilisationsType;
use App\Repository\ConditionsUtilisationsRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
#[Route('/conditions/utilisations')]
class ConditionsUtilisationsController extends AbstractController
{
#[Route('/', name: 'app_conditions_utilisations_show', methods: ['GET'])]
public function show(ConditionsUtilisationsRepository $conditionsUtilisationRepo): Response
{
$conditionsUtilisationArray = $conditionsUtilisationRepo->findAll();
$conditionsUtilisation = "";
if (count($conditionsUtilisationArray) > 0) {
$conditionsUtilisation = $conditionsUtilisationArray[0];
}
return $this->render('conditions_utilisations/show.html.twig', [
'conditions_utilisation' => $conditionsUtilisation,
]);
}
}