<?phpnamespace App\Entity;use App\Repository\ItineraryRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=ItineraryRepository::class) */class Itinerary{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=Offer::class, inversedBy="itineraries") */ private $offer; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $title; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $details; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $kmLabel; /** * @ORM\OneToMany(targetEntity=ItineraryPic::class, mappedBy="itinerary") */ private $itineraryPics; public function __construct() { $this->itineraryPics = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getOffer(): ?Offer { return $this->offer; } public function setOffer(?Offer $offer): self { $this->offer = $offer; return $this; } public function getTitle(): ?string { return $this->title; } public function setTitle(?string $title): self { $this->title = $title; return $this; } public function getDetails(): ?string { return $this->details; } public function setDetails(?string $details): self { $this->details = $details; return $this; } public function getKmLabel(): ?string { return $this->kmLabel; } public function setKmLabel(?string $kmLabel): self { $this->kmLabel = $kmLabel; return $this; } /** * @return Collection<int, ItineraryPic> */ public function getItineraryPics(): Collection { return $this->itineraryPics; } public function addItineraryPic(ItineraryPic $itineraryPic): self { if (!$this->itineraryPics->contains($itineraryPic)) { $this->itineraryPics[] = $itineraryPic; $itineraryPic->setItinerary($this); } return $this; } public function removeItineraryPic(ItineraryPic $itineraryPic): self { if ($this->itineraryPics->removeElement($itineraryPic)) { // set the owning side to null (unless already changed) if ($itineraryPic->getItinerary() === $this) { $itineraryPic->setItinerary(null); } } return $this; }}