From 975bc1e15376ab7dcdaa47706629eb9725feed44 Mon Sep 17 00:00:00 2001 From: Joshua Date: Sun, 27 Oct 2024 23:29:20 +0100 Subject: [PATCH] Modification Table : tabl -> table --- src/Controller/LoginController.php | 4 ---- src/Entity/Clients.php | 20 ++++++++-------- src/Entity/Reservations.php | 10 ++++---- src/Entity/StatutTables.php | 10 ++++---- src/Entity/Tables.php | 38 +++++++++++++++--------------- src/Entity/Utilisateurs.php | 18 +++++++------- 6 files changed, 48 insertions(+), 52 deletions(-) diff --git a/src/Controller/LoginController.php b/src/Controller/LoginController.php index 95d6c71..d8585d4 100644 --- a/src/Controller/LoginController.php +++ b/src/Controller/LoginController.php @@ -12,10 +12,6 @@ class LoginController extends AbstractController #[Route('/login', name: 'app_login')] public function index(AuthenticationUtils $authenticationUtils): Response { - if ($this->getUser()) { - return $this->redirectToRoute('index/index.html.twig'); - } - // get the login error if there is one $error = $authenticationUtils->getLastAuthenticationError(); diff --git a/src/Entity/Clients.php b/src/Entity/Clients.php index a42c5c2..35a78f3 100644 --- a/src/Entity/Clients.php +++ b/src/Entity/Clients.php @@ -30,8 +30,8 @@ class Clients /** * @var Collection */ - #[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'Tabl')] - private Collection $Tabl; + #[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'Client')] + private Collection $table; /** * @var Collection @@ -41,7 +41,7 @@ class Clients public function __construct() { - $this->Tabl = new ArrayCollection(); + $this->table = new ArrayCollection(); $this->commandes = new ArrayCollection(); } @@ -101,23 +101,23 @@ class Clients /** * @return Collection */ - public function getTabl(): Collection + public function getTable(): Collection { - return $this->Tabl; + return $this->table; } - public function addTabl(Tables $tabl): static + public function addTable(Tables $table): static { - if (!$this->Tabl->contains($tabl)) { - $this->Tabl->add($tabl); + if (!$this->table->contains($table)) { + $this->table->add($table); } return $this; } - public function removeTabl(Tables $tabl): static + public function removeTable(Tables $table): static { - $this->Tabl->removeElement($tabl); + $this->table->removeElement($table); return $this; } diff --git a/src/Entity/Reservations.php b/src/Entity/Reservations.php index 0291004..8ad6096 100644 --- a/src/Entity/Reservations.php +++ b/src/Entity/Reservations.php @@ -23,7 +23,7 @@ class Reservations private ?int $Nb_de_prsn = null; #[ORM\ManyToOne(inversedBy: 'reservations')] - private ?Tables $Tabl = null; + private ?Tables $Table = null; /** * @var Collection @@ -65,14 +65,14 @@ class Reservations return $this; } - public function getTabl(): ?Tables + public function getTable(): ?Tables { - return $this->Tabl; + return $this->Table; } - public function setTabl(?Tables $Tabl): static + public function setTable(?Tables $Table): static { - $this->Tabl = $Tabl; + $this->Table = $Table; return $this; } diff --git a/src/Entity/StatutTables.php b/src/Entity/StatutTables.php index de6d4af..f336a5a 100644 --- a/src/Entity/StatutTables.php +++ b/src/Entity/StatutTables.php @@ -17,7 +17,7 @@ class StatutTables private ?string $Libellé = null; #[ORM\ManyToOne(inversedBy: 'statutTables')] - private ?Tables $Tabl = null; + private ?Tables $Table = null; public function getId(): ?int { @@ -36,14 +36,14 @@ class StatutTables return $this; } - public function getTabl(): ?Tables + public function getTable(): ?Tables { - return $this->Tabl; + return $this->Table; } - public function setTabl(?Tables $Tabl): static + public function setTable(?Tables $Table): static { - $this->Tabl = $Tabl; + $this->Table = $Table; return $this; } diff --git a/src/Entity/Tables.php b/src/Entity/Tables.php index 96c66d2..25d3763 100644 --- a/src/Entity/Tables.php +++ b/src/Entity/Tables.php @@ -18,25 +18,25 @@ class Tables /** * @var Collection */ - #[ORM\ManyToMany(targetEntity: Clients::class, mappedBy: 'Tabl')] + #[ORM\ManyToMany(targetEntity: Clients::class, mappedBy: 'table')] private Collection $Clients; /** * @var Collection */ - #[ORM\OneToMany(targetEntity: Reservations::class, mappedBy: 'Tabl')] + #[ORM\OneToMany(targetEntity: Reservations::class, mappedBy: 'Table')] private Collection $reservations; /** * @var Collection */ - #[ORM\OneToMany(targetEntity: StatutTables::class, mappedBy: 'Tabl')] + #[ORM\OneToMany(targetEntity: StatutTables::class, mappedBy: 'Table')] private Collection $statutTables; /** * @var Collection */ - #[ORM\ManyToMany(targetEntity: Utilisateurs::class, mappedBy: 'tabl')] + #[ORM\ManyToMany(targetEntity: Utilisateurs::class, mappedBy: 'table')] private Collection $utilisateurs; public function __construct() @@ -60,20 +60,20 @@ class Tables return $this->Clients; } - public function addClient(Clients $tabl): static + public function addClient(Clients $table): static { - if (!$this->Clients->contains($tabl)) { - $this->Clients->add($tabl); - $tabl->addTabl($this); + if (!$this->Clients->contains($table)) { + $this->Clients->add($table); + $table->addTable($this); } return $this; } - public function removeClient(Clients $tabl): static + public function removeClient(Clients $table): static { - if ($this->Clients->removeElement($tabl)) { - $tabl->removeTabl($this); + if ($this->Clients->removeElement($table)) { + $table->removeTable($this); } return $this; @@ -91,7 +91,7 @@ class Tables { if (!$this->reservations->contains($reservation)) { $this->reservations->add($reservation); - $reservation->setTabl($this); + $reservation->setTable($this); } return $this; @@ -101,8 +101,8 @@ class Tables { if ($this->reservations->removeElement($reservation)) { // set the owning side to null (unless already changed) - if ($reservation->getTabl() === $this) { - $reservation->setTabl(null); + if ($reservation->getTable() === $this) { + $reservation->setTable(null); } } @@ -121,7 +121,7 @@ class Tables { if (!$this->statutTables->contains($statutTable)) { $this->statutTables->add($statutTable); - $statutTable->setTabl($this); + $statutTable->setTable($this); } return $this; @@ -131,8 +131,8 @@ class Tables { if ($this->statutTables->removeElement($statutTable)) { // set the owning side to null (unless already changed) - if ($statutTable->getTabl() === $this) { - $statutTable->setTabl(null); + if ($statutTable->getTable() === $this) { + $statutTable->setTable(null); } } @@ -151,7 +151,7 @@ class Tables { if (!$this->utilisateurs->contains($utilisateur)) { $this->utilisateurs->add($utilisateur); - $utilisateur->addTabl($this); + $utilisateur->addTable($this); } return $this; @@ -160,7 +160,7 @@ class Tables public function removeUtilisateur(Utilisateurs $utilisateur): static { if ($this->utilisateurs->removeElement($utilisateur)) { - $utilisateur->removeTabl($this); + $utilisateur->removeTable($this); } return $this; diff --git a/src/Entity/Utilisateurs.php b/src/Entity/Utilisateurs.php index c5b656d..9a5190a 100644 --- a/src/Entity/Utilisateurs.php +++ b/src/Entity/Utilisateurs.php @@ -42,12 +42,12 @@ class Utilisateurs implements UserInterface, PasswordAuthenticatedUserInterface * @var Collection */ #[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'utilisateurs')] - private Collection $tabl; + private Collection $table; public function __construct() { $this->Reservation = new ArrayCollection(); - $this->tabl = new ArrayCollection(); + $this->table = new ArrayCollection(); } public function getId(): ?int @@ -147,23 +147,23 @@ class Utilisateurs implements UserInterface, PasswordAuthenticatedUserInterface /** * @return Collection */ - public function getTabl(): Collection + public function getTable(): Collection { - return $this->tabl; + return $this->table; } - public function addTabl(Tables $tabl): static + public function addTable(Tables $table): static { - if (!$this->tabl->contains($tabl)) { - $this->tabl->add($tabl); + if (!$this->table->contains($table)) { + $this->table->add($table); } return $this; } - public function removeTabl(Tables $tabl): static + public function removeTable(Tables $table): static { - $this->tabl->removeElement($tabl); + $this->table->removeElement($table); return $this; }