*/ #[ORM\OneToMany(targetEntity: Sortie::class, mappedBy: 'lieu')] private Collection $sorties; #[ORM\ManyToOne(inversedBy: 'lieux')] #[ORM\JoinColumn(name: 'ville_id', referencedColumnName: 'idVille', nullable: false)] private ?Ville $ville = null; public function __construct() { $this->sorties = new ArrayCollection(); } public function getIdLieu(): ?string { return $this->idLieu; } public function getNom(): ?string { return $this->nom; } public function setNom(string $nom): self { $this->nom = $nom; return $this; } public function getRue(): ?string { return $this->rue; } public function setRue(?string $rue): self { $this->rue = $rue; return $this; } public function getLatitude(): ?float { return $this->latitude; } public function setLatitude(?float $latitude): self { $this->latitude = $latitude; return $this; } public function getLongitude(): ?float { return $this->longitude; } public function setLongitude(?float $longitude): self { $this->longitude = $longitude; 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->setLieu($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->getLieu() === $this) { $sortie->setLieu(null); } } return $this; } public function getVille(): ?Ville { return $this->ville; } public function setVille(?Ville $ville): self { $this->ville = $ville; return $this; } }