<?php
namespace App\Entity;
use App\Repository\OfferRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass=OfferRepository::class)
*/
class Offer
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $title;
/**
* Slug immuable et unique (ex: "st-lucie")
* @Gedmo\Slug(fields={"title"}, updatable=true, unique=true)
* @ORM\Column(type="string", length=180, unique=true)
*/
private $slug;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $subtitle;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $description;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $img;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $durationText;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $dateText;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $priceFrom;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isPublish;
/**
* @ORM\OneToMany(targetEntity=OfferHebergement::class, mappedBy="offer")
*/
private $offerHebergements;
/**
* @ORM\ManyToOne(targetEntity=Destination::class, inversedBy="offers")
*/
private $destination;
/**
* @ORM\ManyToOne(targetEntity=TypeVoyage::class, inversedBy="offers")
*/
private $type;
/**
* @ORM\OneToMany(targetEntity=Formule::class, mappedBy="offer")
*/
private $formules;
/**
* @ORM\OneToMany(targetEntity=Included::class, mappedBy="Offer")
*/
private $includeds;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $includedText;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $summaryDuration;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $summaryFlights;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $summaryPaceMeals;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $summaryFrom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $priceNote;
/**
* @ORM\OneToMany(targetEntity=Itinerary::class, mappedBy="offer")
*/
private $itineraries;
/**
* @ORM\OneToMany(targetEntity=Highlight::class, mappedBy="offer")
*/
private $highlights;
/**
* @ORM\OneToMany(targetEntity=HebergemntOffer::class, mappedBy="offer")
*/
private $hebergemntOffers;
/**
* @ORM\OneToMany(targetEntity=Flight::class, mappedBy="offer")
*/
private $flights;
/**
* @ORM\OneToMany(targetEntity=OfferInfo::class, mappedBy="offer")
*/
private $offerInfos;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $brochure;
/**
* @ORM\OneToMany(targetEntity=OurOffer::class, mappedBy="offer")
*/
private $ourOffers;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $OurOffer;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $file;
/**
* @ORM\OneToMany(targetEntity=ItineraryPic::class, mappedBy="Offer")
*/
private $itineraryPics;
/**
* @ORM\ManyToOne(targetEntity=Continent::class, inversedBy="offers")
*/
private $continent;
public function __construct()
{
$this->offerHebergements = new ArrayCollection();
$this->formules = new ArrayCollection();
$this->includeds = new ArrayCollection();
$this->itineraries = new ArrayCollection();
$this->highlights = new ArrayCollection();
$this->hebergemntOffers = new ArrayCollection();
$this->flights = new ArrayCollection();
$this->offerInfos = new ArrayCollection();
$this->ourOffers = new ArrayCollection();
$this->itineraryPics = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
public function getSubtitle(): ?string
{
return $this->subtitle;
}
public function setSubtitle(?string $subtitle): self
{
$this->subtitle = $subtitle;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getImg(): ?string
{
return $this->img;
}
public function setImg(?string $img): self
{
$this->img = $img;
return $this;
}
public function getDurationText(): ?string
{
return $this->durationText;
}
public function setDurationText(?string $durationText): self
{
$this->durationText = $durationText;
return $this;
}
public function getDateText(): ?string
{
return $this->dateText;
}
public function setDateText(?string $dateText): self
{
$this->dateText = $dateText;
return $this;
}
public function getPriceFrom(): ?string
{
return $this->priceFrom;
}
public function setPriceFrom(?string $priceFrom): self
{
$this->priceFrom = $priceFrom;
return $this;
}
public function isIsPublish(): ?bool
{
return $this->isPublish;
}
public function setIsPublish(?bool $isPublish): self
{
$this->isPublish = $isPublish;
return $this;
}
public function getDestination(): ?Destination
{
return $this->destination;
}
public function setDestination(?Destination $destination): self
{
$this->destination = $destination;
return $this;
}
public function getType(): ?TypeVoyage
{
return $this->type;
}
public function setType(?TypeVoyage $type): self
{
$this->type = $type;
return $this;
}
/**
* @return Collection<int, Formule>
*/
public function getFormules(): Collection
{
return $this->formules;
}
public function addFormule(Formule $formule): self
{
if (!$this->formules->contains($formule)) {
$this->formules[] = $formule;
$formule->setOffer($this);
}
return $this;
}
public function removeFormule(Formule $formule): self
{
if ($this->formules->removeElement($formule)) {
// set the owning side to null (unless already changed)
if ($formule->getOffer() === $this) {
$formule->setOffer(null);
}
}
return $this;
}
/**
* @return Collection<int, Included>
*/
public function getIncludeds(): Collection
{
return $this->includeds;
}
public function addIncluded(Included $included): self
{
if (!$this->includeds->contains($included)) {
$this->includeds[] = $included;
$included->setOffer($this);
}
return $this;
}
public function removeIncluded(Included $included): self
{
if ($this->includeds->removeElement($included)) {
// set the owning side to null (unless already changed)
if ($included->getOffer() === $this) {
$included->setOffer(null);
}
}
return $this;
}
public function getIncludedText(): ?string
{
return $this->includedText;
}
public function setIncludedText(?string $includedText): self
{
$this->includedText = $includedText;
return $this;
}
/**
* Get slug immuable et unique (ex: "st-lucie")
*/
public function getSlug()
{
return $this->slug;
}
/**
* Set slug immuable et unique (ex: "st-lucie")
*
* @return self
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
public function getSummaryDuration(): ?string
{
return $this->summaryDuration;
}
public function setSummaryDuration(?string $summaryDuration): self
{
$this->summaryDuration = $summaryDuration;
return $this;
}
public function getSummaryFlights(): ?string
{
return $this->summaryFlights;
}
public function setSummaryFlights(?string $summaryFlights): self
{
$this->summaryFlights = $summaryFlights;
return $this;
}
public function getSummaryPaceMeals(): ?string
{
return $this->summaryPaceMeals;
}
public function setSummaryPaceMeals(?string $summaryPaceMeals): self
{
$this->summaryPaceMeals = $summaryPaceMeals;
return $this;
}
public function getSummaryFrom(): ?string
{
return $this->summaryFrom;
}
public function setSummaryFrom(?string $summaryFrom): self
{
$this->summaryFrom = $summaryFrom;
return $this;
}
public function getPriceNote(): ?string
{
return $this->priceNote;
}
public function setPriceNote(?string $priceNote): self
{
$this->priceNote = $priceNote;
return $this;
}
/**
* @return Collection<int, Itinerary>
*/
public function getItineraries(): Collection
{
return $this->itineraries;
}
public function addItinerary(Itinerary $itinerary): self
{
if (!$this->itineraries->contains($itinerary)) {
$this->itineraries[] = $itinerary;
$itinerary->setOffer($this);
}
return $this;
}
public function removeItinerary(Itinerary $itinerary): self
{
if ($this->itineraries->removeElement($itinerary)) {
// set the owning side to null (unless already changed)
if ($itinerary->getOffer() === $this) {
$itinerary->setOffer(null);
}
}
return $this;
}
/**
* @return Collection<int, Highlight>
*/
public function getHighlights(): Collection
{
return $this->highlights;
}
public function addHighlight(Highlight $highlight): self
{
if (!$this->highlights->contains($highlight)) {
$this->highlights[] = $highlight;
$highlight->setOffer($this);
}
return $this;
}
public function removeHighlight(Highlight $highlight): self
{
if ($this->highlights->removeElement($highlight)) {
// set the owning side to null (unless already changed)
if ($highlight->getOffer() === $this) {
$highlight->setOffer(null);
}
}
return $this;
}
/**
* @return Collection<int, HebergemntOffer>
*/
public function getHebergemntOffers(): Collection
{
return $this->hebergemntOffers;
}
public function addHebergemntOffer(HebergemntOffer $hebergemntOffer): self
{
if (!$this->hebergemntOffers->contains($hebergemntOffer)) {
$this->hebergemntOffers[] = $hebergemntOffer;
$hebergemntOffer->setOffer($this);
}
return $this;
}
public function removeHebergemntOffer(HebergemntOffer $hebergemntOffer): self
{
if ($this->hebergemntOffers->removeElement($hebergemntOffer)) {
// set the owning side to null (unless already changed)
if ($hebergemntOffer->getOffer() === $this) {
$hebergemntOffer->setOffer(null);
}
}
return $this;
}
/**
* @return Collection<int, Flight>
*/
public function getFlights(): Collection
{
return $this->flights;
}
public function addFlight(Flight $flight): self
{
if (!$this->flights->contains($flight)) {
$this->flights[] = $flight;
$flight->setOffer($this);
}
return $this;
}
public function removeFlight(Flight $flight): self
{
if ($this->flights->removeElement($flight)) {
// set the owning side to null (unless already changed)
if ($flight->getOffer() === $this) {
$flight->setOffer(null);
}
}
return $this;
}
/**
* @return Collection<int, OfferInfo>
*/
public function getOfferInfos(): Collection
{
return $this->offerInfos;
}
public function addOfferInfo(OfferInfo $offerInfo): self
{
if (!$this->offerInfos->contains($offerInfo)) {
$this->offerInfos[] = $offerInfo;
$offerInfo->setOffer($this);
}
return $this;
}
public function removeOfferInfo(OfferInfo $offerInfo): self
{
if ($this->offerInfos->removeElement($offerInfo)) {
// set the owning side to null (unless already changed)
if ($offerInfo->getOffer() === $this) {
$offerInfo->setOffer(null);
}
}
return $this;
}
public function getBrochure(): ?string
{
return $this->brochure;
}
public function setBrochure(?string $brochure): self
{
$this->brochure = $brochure;
return $this;
}
/**
* @return Collection<int, OurOffer>
*/
public function getOurOffers(): Collection
{
return $this->ourOffers;
}
public function addOurOffer(OurOffer $ourOffer): self
{
if (!$this->ourOffers->contains($ourOffer)) {
$this->ourOffers[] = $ourOffer;
$ourOffer->setOffer($this);
}
return $this;
}
public function removeOurOffer(OurOffer $ourOffer): self
{
if ($this->ourOffers->removeElement($ourOffer)) {
// set the owning side to null (unless already changed)
if ($ourOffer->getOffer() === $this) {
$ourOffer->setOffer(null);
}
}
return $this;
}
public function getOurOffer(): ?int
{
return $this->OurOffer;
}
public function setOurOffer(?int $OurOffer): self
{
$this->OurOffer = $OurOffer;
return $this;
}
public function getFile(): ?string
{
return $this->file;
}
public function setFile(?string $file): self
{
$this->file = $file;
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->setOffer($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->getOffer() === $this) {
$itineraryPic->setOffer(null);
}
}
return $this;
}
public function getContinent(): ?Continent
{
return $this->continent;
}
public function setContinent(?Continent $continent): self
{
$this->continent = $continent;
return $this;
}
}