*/ #[ORM\OneToMany(targetEntity: Commandes::class, mappedBy: 'StatutCommande')] private Collection $commandes; public function __construct() { $this->commandes = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getLibelle(): ?string { return $this->Libelle; } public function setLibelle(string $Libelle): static { $this->Libelle = $Libelle; return $this; } /** * @return Collection */ public function getCommandes(): Collection { return $this->commandes; } public function addCommande(Commandes $commande): static { if (!$this->commandes->contains($commande)) { $this->commandes->add($commande); $commande->setStatutCommande($this); } return $this; } public function removeCommande(Commandes $commande): static { if ($this->commandes->removeElement($commande)) { // set the owning side to null (unless already changed) if ($commande->getStatutCommande() === $this) { $commande->setStatutCommande(null); } } return $this; } }