src/Entity/Offer.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OfferRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. /**
  9.  * @ORM\Entity(repositoryClass=OfferRepository::class)
  10.  */
  11. class Offer
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=255, nullable=true)
  21.      */
  22.     private $title;
  23.     /**
  24.      * Slug immuable et unique (ex: "st-lucie")
  25.      * @Gedmo\Slug(fields={"title"}, updatable=true, unique=true)
  26.      * @ORM\Column(type="string", length=180, unique=true)
  27.      */
  28.     private $slug;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=true)
  31.      */
  32.     private $subtitle;
  33.     /**
  34.      * @ORM\Column(type="string", length=255, nullable=true)
  35.      */
  36.     private $description;
  37.     /**
  38.      * @ORM\Column(type="string", length=255, nullable=true)
  39.      */
  40.     private $img;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=true)
  43.      */
  44.     private $durationText;
  45.     /**
  46.      * @ORM\Column(type="string", length=255, nullable=true)
  47.      */
  48.     private $dateText;
  49.     /**
  50.      * @ORM\Column(type="string", length=255, nullable=true)
  51.      */
  52.     private $priceFrom;
  53.     /**
  54.      * @ORM\Column(type="boolean", nullable=true)
  55.      */
  56.     private $isPublish;
  57.     /**
  58.      * @ORM\OneToMany(targetEntity=OfferHebergement::class, mappedBy="offer")
  59.      */
  60.     private $offerHebergements;
  61.     /**
  62.      * @ORM\ManyToOne(targetEntity=Destination::class, inversedBy="offers")
  63.      */
  64.     private $destination;
  65.     /**
  66.      * @ORM\ManyToOne(targetEntity=TypeVoyage::class, inversedBy="offers")
  67.      */
  68.     private $type;
  69.     /**
  70.      * @ORM\OneToMany(targetEntity=Formule::class, mappedBy="offer")
  71.      */
  72.     private $formules;
  73.     /**
  74.      * @ORM\OneToMany(targetEntity=Included::class, mappedBy="Offer")
  75.      */
  76.     private $includeds;
  77.     /**
  78.      * @ORM\Column(type="string", length=255, nullable=true)
  79.      */
  80.     private $includedText;
  81.     /**
  82.      * @ORM\Column(type="string", length=255, nullable=true)
  83.      */
  84.     private $summaryDuration;
  85.     /**
  86.      * @ORM\Column(type="string", length=255, nullable=true)
  87.      */
  88.     private $summaryFlights;
  89.     /**
  90.      * @ORM\Column(type="string", length=255, nullable=true)
  91.      */
  92.     private $summaryPaceMeals;
  93.     /**
  94.      * @ORM\Column(type="string", length=255, nullable=true)
  95.      */
  96.     private $summaryFrom;
  97.     /**
  98.      * @ORM\Column(type="string", length=255, nullable=true)
  99.      */
  100.     private $priceNote;
  101.     /**
  102.      * @ORM\OneToMany(targetEntity=Itinerary::class, mappedBy="offer")
  103.      */
  104.     private $itineraries;
  105.     /**
  106.      * @ORM\OneToMany(targetEntity=Highlight::class, mappedBy="offer")
  107.      */
  108.     private $highlights;
  109.     /**
  110.      * @ORM\OneToMany(targetEntity=HebergemntOffer::class, mappedBy="offer")
  111.      */
  112.     private $hebergemntOffers;
  113.     /**
  114.      * @ORM\OneToMany(targetEntity=Flight::class, mappedBy="offer")
  115.      */
  116.     private $flights;
  117.     /**
  118.      * @ORM\OneToMany(targetEntity=OfferInfo::class, mappedBy="offer")
  119.      */
  120.     private $offerInfos;
  121.     /**
  122.      * @ORM\Column(type="string", length=255, nullable=true)
  123.      */
  124.     private $brochure;
  125.     /**
  126.      * @ORM\OneToMany(targetEntity=OurOffer::class, mappedBy="offer")
  127.      */
  128.     private $ourOffers;
  129.     /**
  130.      * @ORM\Column(type="integer", nullable=true)
  131.      */
  132.     private $OurOffer;
  133.     /**
  134.      * @ORM\Column(type="string", length=255, nullable=true)
  135.      */
  136.     private $file;
  137.     /**
  138.      * @ORM\OneToMany(targetEntity=ItineraryPic::class, mappedBy="Offer")
  139.      */
  140.     private $itineraryPics;
  141.     /**
  142.      * @ORM\ManyToOne(targetEntity=Continent::class, inversedBy="offers")
  143.      */
  144.     private $continent;
  145.     /**
  146.      * @ORM\Column(type="integer", nullable=true)
  147.      */
  148.     private $oSelection;
  149.     /**
  150.      * @ORM\Column(type="string", length=255, nullable=true)
  151.      */
  152.     private $included;
  153.     /**
  154.      * @ORM\Column(type="string", length=255, nullable=true)
  155.      */
  156.     private $notIncluded;
  157.     /**
  158.      * @ORM\Column(type="string", length=255, nullable=true)
  159.      */
  160.     private $formalities;
  161.     /**
  162.      * @ORM\Column(type="string", length=255, nullable=true)
  163.      */
  164.     private $paymentMethod;
  165.     /**
  166.      * @ORM\Column(type="string", length=255, nullable=true)
  167.      */
  168.     private $widget;
  169.     public function __construct()
  170.     {
  171.         $this->offerHebergements = new ArrayCollection();
  172.         $this->formules = new ArrayCollection();
  173.         $this->includeds = new ArrayCollection();
  174.         $this->itineraries = new ArrayCollection();
  175.         $this->highlights = new ArrayCollection();
  176.         $this->hebergemntOffers = new ArrayCollection();
  177.         $this->flights = new ArrayCollection();
  178.         $this->offerInfos = new ArrayCollection();
  179.         $this->ourOffers = new ArrayCollection();
  180.         $this->itineraryPics = new ArrayCollection();
  181.     }
  182.     public function getId(): ?int
  183.     {
  184.         return $this->id;
  185.     }
  186.     public function getTitle(): ?string
  187.     {
  188.         return $this->title;
  189.     }
  190.     public function setTitle(?string $title): self
  191.     {
  192.         $this->title $title;
  193.         return $this;
  194.     }
  195.     public function getSubtitle(): ?string
  196.     {
  197.         return $this->subtitle;
  198.     }
  199.     public function setSubtitle(?string $subtitle): self
  200.     {
  201.         $this->subtitle $subtitle;
  202.         return $this;
  203.     }
  204.     public function getDescription(): ?string
  205.     {
  206.         return $this->description;
  207.     }
  208.     public function setDescription(?string $description): self
  209.     {
  210.         $this->description $description;
  211.         return $this;
  212.     }
  213.     public function getImg(): ?string
  214.     {
  215.         return $this->img;
  216.     }
  217.     public function setImg(?string $img): self
  218.     {
  219.         $this->img $img;
  220.         return $this;
  221.     }
  222.     public function getDurationText(): ?string
  223.     {
  224.         return $this->durationText;
  225.     }
  226.     public function setDurationText(?string $durationText): self
  227.     {
  228.         $this->durationText $durationText;
  229.         return $this;
  230.     }
  231.     public function getDateText(): ?string
  232.     {
  233.         return $this->dateText;
  234.     }
  235.     public function setDateText(?string $dateText): self
  236.     {
  237.         $this->dateText $dateText;
  238.         return $this;
  239.     }
  240.     public function getPriceFrom(): ?string
  241.     {
  242.         return $this->priceFrom;
  243.     }
  244.     public function setPriceFrom(?string $priceFrom): self
  245.     {
  246.         $this->priceFrom $priceFrom;
  247.         return $this;
  248.     }
  249.     public function isIsPublish(): ?bool
  250.     {
  251.         return $this->isPublish;
  252.     }
  253.     public function setIsPublish(?bool $isPublish): self
  254.     {
  255.         $this->isPublish $isPublish;
  256.         return $this;
  257.     }
  258.     public function getDestination(): ?Destination
  259.     {
  260.         return $this->destination;
  261.     }
  262.     public function setDestination(?Destination $destination): self
  263.     {
  264.         $this->destination $destination;
  265.         return $this;
  266.     }
  267.     public function getType(): ?TypeVoyage
  268.     {
  269.         return $this->type;
  270.     }
  271.     public function setType(?TypeVoyage $type): self
  272.     {
  273.         $this->type $type;
  274.         return $this;
  275.     }
  276.     /**
  277.      * @return Collection<int, Formule>
  278.      */
  279.     public function getFormules(): Collection
  280.     {
  281.         return $this->formules;
  282.     }
  283.     public function addFormule(Formule $formule): self
  284.     {
  285.         if (!$this->formules->contains($formule)) {
  286.             $this->formules[] = $formule;
  287.             $formule->setOffer($this);
  288.         }
  289.         return $this;
  290.     }
  291.     public function removeFormule(Formule $formule): self
  292.     {
  293.         if ($this->formules->removeElement($formule)) {
  294.             // set the owning side to null (unless already changed)
  295.             if ($formule->getOffer() === $this) {
  296.                 $formule->setOffer(null);
  297.             }
  298.         }
  299.         return $this;
  300.     }
  301.     /**
  302.      * @return Collection<int, Included>
  303.      */
  304.     public function getIncludeds(): Collection
  305.     {
  306.         return $this->includeds;
  307.     }
  308.     public function addIncluded(Included $included): self
  309.     {
  310.         if (!$this->includeds->contains($included)) {
  311.             $this->includeds[] = $included;
  312.             $included->setOffer($this);
  313.         }
  314.         return $this;
  315.     }
  316.     public function removeIncluded(Included $included): self
  317.     {
  318.         if ($this->includeds->removeElement($included)) {
  319.             // set the owning side to null (unless already changed)
  320.             if ($included->getOffer() === $this) {
  321.                 $included->setOffer(null);
  322.             }
  323.         }
  324.         return $this;
  325.     }
  326.     public function getIncludedText(): ?string
  327.     {
  328.         return $this->includedText;
  329.     }
  330.     public function setIncludedText(?string $includedText): self
  331.     {
  332.         $this->includedText $includedText;
  333.         return $this;
  334.     }
  335.     /**
  336.      * Get slug immuable et unique (ex: "st-lucie")
  337.      */ 
  338.     public function getSlug()
  339.     {
  340.         return $this->slug;
  341.     }
  342.     /**
  343.      * Set slug immuable et unique (ex: "st-lucie")
  344.      *
  345.      * @return  self
  346.      */ 
  347.     public function setSlug($slug)
  348.     {
  349.         $this->slug $slug;
  350.         return $this;
  351.     }
  352.     public function getSummaryDuration(): ?string
  353.     {
  354.         return $this->summaryDuration;
  355.     }
  356.     public function setSummaryDuration(?string $summaryDuration): self
  357.     {
  358.         $this->summaryDuration $summaryDuration;
  359.         return $this;
  360.     }
  361.     public function getSummaryFlights(): ?string
  362.     {
  363.         return $this->summaryFlights;
  364.     }
  365.     public function setSummaryFlights(?string $summaryFlights): self
  366.     {
  367.         $this->summaryFlights $summaryFlights;
  368.         return $this;
  369.     }
  370.     public function getSummaryPaceMeals(): ?string
  371.     {
  372.         return $this->summaryPaceMeals;
  373.     }
  374.     public function setSummaryPaceMeals(?string $summaryPaceMeals): self
  375.     {
  376.         $this->summaryPaceMeals $summaryPaceMeals;
  377.         return $this;
  378.     }
  379.     public function getSummaryFrom(): ?string
  380.     {
  381.         return $this->summaryFrom;
  382.     }
  383.     public function setSummaryFrom(?string $summaryFrom): self
  384.     {
  385.         $this->summaryFrom $summaryFrom;
  386.         return $this;
  387.     }
  388.     public function getPriceNote(): ?string
  389.     {
  390.         return $this->priceNote;
  391.     }
  392.     public function setPriceNote(?string $priceNote): self
  393.     {
  394.         $this->priceNote $priceNote;
  395.         return $this;
  396.     }
  397.     /**
  398.      * @return Collection<int, Itinerary>
  399.      */
  400.     public function getItineraries(): Collection
  401.     {
  402.         return $this->itineraries;
  403.     }
  404.     public function addItinerary(Itinerary $itinerary): self
  405.     {
  406.         if (!$this->itineraries->contains($itinerary)) {
  407.             $this->itineraries[] = $itinerary;
  408.             $itinerary->setOffer($this);
  409.         }
  410.         return $this;
  411.     }
  412.     public function removeItinerary(Itinerary $itinerary): self
  413.     {
  414.         if ($this->itineraries->removeElement($itinerary)) {
  415.             // set the owning side to null (unless already changed)
  416.             if ($itinerary->getOffer() === $this) {
  417.                 $itinerary->setOffer(null);
  418.             }
  419.         }
  420.         return $this;
  421.     }
  422.     /**
  423.      * @return Collection<int, Highlight>
  424.      */
  425.     public function getHighlights(): Collection
  426.     {
  427.         return $this->highlights;
  428.     }
  429.     public function addHighlight(Highlight $highlight): self
  430.     {
  431.         if (!$this->highlights->contains($highlight)) {
  432.             $this->highlights[] = $highlight;
  433.             $highlight->setOffer($this);
  434.         }
  435.         return $this;
  436.     }
  437.     public function removeHighlight(Highlight $highlight): self
  438.     {
  439.         if ($this->highlights->removeElement($highlight)) {
  440.             // set the owning side to null (unless already changed)
  441.             if ($highlight->getOffer() === $this) {
  442.                 $highlight->setOffer(null);
  443.             }
  444.         }
  445.         return $this;
  446.     }
  447.     /**
  448.      * @return Collection<int, HebergemntOffer>
  449.      */
  450.     public function getHebergemntOffers(): Collection
  451.     {
  452.         return $this->hebergemntOffers;
  453.     }
  454.     public function addHebergemntOffer(HebergemntOffer $hebergemntOffer): self
  455.     {
  456.         if (!$this->hebergemntOffers->contains($hebergemntOffer)) {
  457.             $this->hebergemntOffers[] = $hebergemntOffer;
  458.             $hebergemntOffer->setOffer($this);
  459.         }
  460.         return $this;
  461.     }
  462.     public function removeHebergemntOffer(HebergemntOffer $hebergemntOffer): self
  463.     {
  464.         if ($this->hebergemntOffers->removeElement($hebergemntOffer)) {
  465.             // set the owning side to null (unless already changed)
  466.             if ($hebergemntOffer->getOffer() === $this) {
  467.                 $hebergemntOffer->setOffer(null);
  468.             }
  469.         }
  470.         return $this;
  471.     }
  472.     /**
  473.      * @return Collection<int, Flight>
  474.      */
  475.     public function getFlights(): Collection
  476.     {
  477.         return $this->flights;
  478.     }
  479.     public function addFlight(Flight $flight): self
  480.     {
  481.         if (!$this->flights->contains($flight)) {
  482.             $this->flights[] = $flight;
  483.             $flight->setOffer($this);
  484.         }
  485.         return $this;
  486.     }
  487.     public function removeFlight(Flight $flight): self
  488.     {
  489.         if ($this->flights->removeElement($flight)) {
  490.             // set the owning side to null (unless already changed)
  491.             if ($flight->getOffer() === $this) {
  492.                 $flight->setOffer(null);
  493.             }
  494.         }
  495.         return $this;
  496.     }
  497.     /**
  498.      * @return Collection<int, OfferInfo>
  499.      */
  500.     public function getOfferInfos(): Collection
  501.     {
  502.         return $this->offerInfos;
  503.     }
  504.     public function addOfferInfo(OfferInfo $offerInfo): self
  505.     {
  506.         if (!$this->offerInfos->contains($offerInfo)) {
  507.             $this->offerInfos[] = $offerInfo;
  508.             $offerInfo->setOffer($this);
  509.         }
  510.         return $this;
  511.     }
  512.     public function removeOfferInfo(OfferInfo $offerInfo): self
  513.     {
  514.         if ($this->offerInfos->removeElement($offerInfo)) {
  515.             // set the owning side to null (unless already changed)
  516.             if ($offerInfo->getOffer() === $this) {
  517.                 $offerInfo->setOffer(null);
  518.             }
  519.         }
  520.         return $this;
  521.     }
  522.     public function getBrochure(): ?string
  523.     {
  524.         return $this->brochure;
  525.     }
  526.     public function setBrochure(?string $brochure): self
  527.     {
  528.         $this->brochure $brochure;
  529.         return $this;
  530.     }
  531.     /**
  532.      * @return Collection<int, OurOffer>
  533.      */
  534.     public function getOurOffers(): Collection
  535.     {
  536.         return $this->ourOffers;
  537.     }
  538.     public function addOurOffer(OurOffer $ourOffer): self
  539.     {
  540.         if (!$this->ourOffers->contains($ourOffer)) {
  541.             $this->ourOffers[] = $ourOffer;
  542.             $ourOffer->setOffer($this);
  543.         }
  544.         return $this;
  545.     }
  546.     public function removeOurOffer(OurOffer $ourOffer): self
  547.     {
  548.         if ($this->ourOffers->removeElement($ourOffer)) {
  549.             // set the owning side to null (unless already changed)
  550.             if ($ourOffer->getOffer() === $this) {
  551.                 $ourOffer->setOffer(null);
  552.             }
  553.         }
  554.         return $this;
  555.     }
  556.     public function getOurOffer(): ?int
  557.     {
  558.         return $this->OurOffer;
  559.     }
  560.     public function setOurOffer(?int $OurOffer): self
  561.     {
  562.         $this->OurOffer $OurOffer;
  563.         return $this;
  564.     }
  565.     public function getFile(): ?string
  566.     {
  567.         return $this->file;
  568.     }
  569.     public function setFile(?string $file): self
  570.     {
  571.         $this->file $file;
  572.         return $this;
  573.     }
  574.     /**
  575.      * @return Collection<int, ItineraryPic>
  576.      */
  577.     public function getItineraryPics(): Collection
  578.     {
  579.         return $this->itineraryPics;
  580.     }
  581.     public function addItineraryPic(ItineraryPic $itineraryPic): self
  582.     {
  583.         if (!$this->itineraryPics->contains($itineraryPic)) {
  584.             $this->itineraryPics[] = $itineraryPic;
  585.             $itineraryPic->setOffer($this);
  586.         }
  587.         return $this;
  588.     }
  589.     public function removeItineraryPic(ItineraryPic $itineraryPic): self
  590.     {
  591.         if ($this->itineraryPics->removeElement($itineraryPic)) {
  592.             // set the owning side to null (unless already changed)
  593.             if ($itineraryPic->getOffer() === $this) {
  594.                 $itineraryPic->setOffer(null);
  595.             }
  596.         }
  597.         return $this;
  598.     }
  599.     public function getContinent(): ?Continent
  600.     {
  601.         return $this->continent;
  602.     }
  603.     public function setContinent(?Continent $continent): self
  604.     {
  605.         $this->continent $continent;
  606.         return $this;
  607.     }
  608.     public function getOSelection(): ?int
  609.     {
  610.         return $this->oSelection;
  611.     }
  612.     public function setOSelection(?int $oSelection): self
  613.     {
  614.         $this->oSelection $oSelection;
  615.         return $this;
  616.     }
  617.     public function getIncluded(): ?string
  618.     {
  619.         return $this->included;
  620.     }
  621.     public function setIncluded(?string $included): self
  622.     {
  623.         $this->included $included;
  624.         return $this;
  625.     }
  626.     public function getNotIncluded(): ?string
  627.     {
  628.         return $this->notIncluded;
  629.     }
  630.     public function setNotIncluded(?string $notIncluded): self
  631.     {
  632.         $this->notIncluded $notIncluded;
  633.         return $this;
  634.     }
  635.     public function getFormalities(): ?string
  636.     {
  637.         return $this->formalities;
  638.     }
  639.     public function setFormalities(?string $formalities): self
  640.     {
  641.         $this->formalities $formalities;
  642.         return $this;
  643.     }
  644.     public function getPaymentMethod(): ?string
  645.     {
  646.         return $this->paymentMethod;
  647.     }
  648.     public function setPaymentMethod(?string $paymentMethod): self
  649.     {
  650.         $this->paymentMethod $paymentMethod;
  651.         return $this;
  652.     }
  653.     public function getWidget(): ?string
  654.     {
  655.         return $this->widget;
  656.     }
  657.     public function setWidget(?string $widget): self
  658.     {
  659.         $this->widget $widget;
  660.         return $this;
  661.     }
  662. }