*/ #[ORM\OneToMany(targetEntity: Sortie::class, mappedBy: 'etat')] private Collection $sorties; public function __construct() { $this->sorties = new ArrayCollection(); } public function getIdEtat(): ?string // Changement ici { return $this->idEtat; } public function getLibelle(): ?string { return $this->libelle; } public function setLibelle(string $libelle): self { $this->libelle = $libelle; return $this; } /** * @return Collection */ public function getSorties(): Collection { return $this->sorties; } public function addSortie(Sortie $sortie): self { if (!$this->sorties->contains($sortie)) { $this->sorties->add($sortie); $sortie->setEtat($this); } return $this; } public function removeSortie(Sortie $sortie): self { if ($this->sorties->removeElement($sortie)) { // Set the owning side to null (unless already changed) if ($sortie->getEtat() === $this) { $sortie->setEtat(null); } } return $this; } }