Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
www.humitest.fr
/
htdocs
/
src
/
Controller
/
back_user
/
/srv/data/web/vhosts/www.humitest.fr/htdocs/src/Controller/back_user/CommandController.php
<?php namespace App\Controller\back_user; use App\Entity\Command; use App\Form\CommandType; use App\Repository\CommandRepository; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; /** * @Route("/esapce-client/commandes") */ class CommandController extends AbstractController { /** * @Route("/", name="client_command_search", methods="GET") */ public function search(CommandRepository $commandRepository): Response { $email_client = $this->getUser()->getEmail(); #reccuper l'email du user connecté $commandeUser = $commandRepository->findBy(['email' => $email_client], ['createdAt' => 'DESC']); return $this->render('espace-client/command/search.html.twig', [ 'slug'=>'admin_command', 'commandeUser' => $commandeUser, ]); } /** * @Route("/{id}", name="client_command_read", methods="GET") */ public function read(Command $command,CommandRepository $commandRepository): Response { return $this->render('espace-client/command/read.html.twig', [ 'command' => $command, 'slug'=>'admin_command', 'totalNouveauProduit' => $commandRepository->totalNewProduct(), ]); } // /** // * @Route("/delete/{id}", name="admin_command_delete", methods="DELETE") // */ // public function delete(Request $request, Command $command): Response // { // $msg = 'Enregistrement supprimé avec succès'; // $em = $this->getDoctrine()->getManager(); // $em->remove($command); // $em->flush(); // $this->addFlash('success', $msg); // return $this->redirectToRoute('admin_command_search'); // } }