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.     /**
  170.      * @ORM\Column(type="string", length=255, nullable=true)
  171.      */
  172.     private $titleSeo;
  173.     /**
  174.      * @ORM\Column(type="string", length=255, nullable=true)
  175.      */
  176.     private $metaTitle;
  177.     /**
  178.      * @ORM\Column(type="string", length=255, nullable=true)
  179.      */
  180.     private $metaDescription;
  181.     /**
  182.      * @ORM\Column(type="string", length=255, nullable=true)
  183.      */
  184.     private $highlightText;
  185.     /**
  186.      * @ORM\Column(type="string", length=255, nullable=true)
  187.      */
  188.     private $highlightTitle;
  189.     public function __construct()
  190.     {
  191.         $this->offerHebergements = new ArrayCollection();
  192.         $this->formules = new ArrayCollection();
  193.         $this->includeds = new ArrayCollection();
  194.         $this->itineraries = new ArrayCollection();
  195.         $this->highlights = new ArrayCollection();
  196.         $this->hebergemntOffers = new ArrayCollection();
  197.         $this->flights = new ArrayCollection();
  198.         $this->offerInfos = new ArrayCollection();
  199.         $this->ourOffers = new ArrayCollection();
  200.         $this->itineraryPics = new ArrayCollection();
  201.     }
  202.     public function getId(): ?int
  203.     {
  204.         return $this->id;
  205.     }
  206.     public function getTitle(): ?string
  207.     {
  208.         return $this->title;
  209.     }
  210.     public function setTitle(?string $title): self
  211.     {
  212.         $this->title $title;
  213.         return $this;
  214.     }
  215.     public function getSubtitle(): ?string
  216.     {
  217.         return $this->subtitle;
  218.     }
  219.     public function setSubtitle(?string $subtitle): self
  220.     {
  221.         $this->subtitle $subtitle;
  222.         return $this;
  223.     }
  224.     public function getDescription(): ?string
  225.     {
  226.         return $this->description;
  227.     }
  228.     public function setDescription(?string $description): self
  229.     {
  230.         $this->description $description;
  231.         return $this;
  232.     }
  233.     public function getImg(): ?string
  234.     {
  235.         return $this->img;
  236.     }
  237.     public function setImg(?string $img): self
  238.     {
  239.         $this->img $img;
  240.         return $this;
  241.     }
  242.     public function getDurationText(): ?string
  243.     {
  244.         return $this->durationText;
  245.     }
  246.     public function setDurationText(?string $durationText): self
  247.     {
  248.         $this->durationText $durationText;
  249.         return $this;
  250.     }
  251.     public function getDateText(): ?string
  252.     {
  253.         return $this->dateText;
  254.     }
  255.     public function setDateText(?string $dateText): self
  256.     {
  257.         $this->dateText $dateText;
  258.         return $this;
  259.     }
  260.     public function getPriceFrom(): ?string
  261.     {
  262.         return $this->priceFrom;
  263.     }
  264.     public function setPriceFrom(?string $priceFrom): self
  265.     {
  266.         $this->priceFrom $priceFrom;
  267.         return $this;
  268.     }
  269.     public function isIsPublish(): ?bool
  270.     {
  271.         return $this->isPublish;
  272.     }
  273.     public function setIsPublish(?bool $isPublish): self
  274.     {
  275.         $this->isPublish $isPublish;
  276.         return $this;
  277.     }
  278.     public function getDestination(): ?Destination
  279.     {
  280.         return $this->destination;
  281.     }
  282.     public function setDestination(?Destination $destination): self
  283.     {
  284.         $this->destination $destination;
  285.         return $this;
  286.     }
  287.     public function getType(): ?TypeVoyage
  288.     {
  289.         return $this->type;
  290.     }
  291.     public function setType(?TypeVoyage $type): self
  292.     {
  293.         $this->type $type;
  294.         return $this;
  295.     }
  296.     /**
  297.      * @return Collection<int, Formule>
  298.      */
  299.     public function getFormules(): Collection
  300.     {
  301.         return $this->formules;
  302.     }
  303.     public function addFormule(Formule $formule): self
  304.     {
  305.         if (!$this->formules->contains($formule)) {
  306.             $this->formules[] = $formule;
  307.             $formule->setOffer($this);
  308.         }
  309.         return $this;
  310.     }
  311.     public function removeFormule(Formule $formule): self
  312.     {
  313.         if ($this->formules->removeElement($formule)) {
  314.             // set the owning side to null (unless already changed)
  315.             if ($formule->getOffer() === $this) {
  316.                 $formule->setOffer(null);
  317.             }
  318.         }
  319.         return $this;
  320.     }
  321.     /**
  322.      * @return Collection<int, Included>
  323.      */
  324.     public function getIncludeds(): Collection
  325.     {
  326.         return $this->includeds;
  327.     }
  328.     public function addIncluded(Included $included): self
  329.     {
  330.         if (!$this->includeds->contains($included)) {
  331.             $this->includeds[] = $included;
  332.             $included->setOffer($this);
  333.         }
  334.         return $this;
  335.     }
  336.     public function removeIncluded(Included $included): self
  337.     {
  338.         if ($this->includeds->removeElement($included)) {
  339.             // set the owning side to null (unless already changed)
  340.             if ($included->getOffer() === $this) {
  341.                 $included->setOffer(null);
  342.             }
  343.         }
  344.         return $this;
  345.     }
  346.     public function getIncludedText(): ?string
  347.     {
  348.         return $this->includedText;
  349.     }
  350.     public function setIncludedText(?string $includedText): self
  351.     {
  352.         $this->includedText $includedText;
  353.         return $this;
  354.     }
  355.     /**
  356.      * Get slug immuable et unique (ex: "st-lucie")
  357.      */ 
  358.     public function getSlug()
  359.     {
  360.         return $this->slug;
  361.     }
  362.     /**
  363.      * Set slug immuable et unique (ex: "st-lucie")
  364.      *
  365.      * @return  self
  366.      */ 
  367.     public function setSlug($slug)
  368.     {
  369.         $this->slug $slug;
  370.         return $this;
  371.     }
  372.     public function getSummaryDuration(): ?string
  373.     {
  374.         return $this->summaryDuration;
  375.     }
  376.     public function setSummaryDuration(?string $summaryDuration): self
  377.     {
  378.         $this->summaryDuration $summaryDuration;
  379.         return $this;
  380.     }
  381.     public function getSummaryFlights(): ?string
  382.     {
  383.         return $this->summaryFlights;
  384.     }
  385.     public function setSummaryFlights(?string $summaryFlights): self
  386.     {
  387.         $this->summaryFlights $summaryFlights;
  388.         return $this;
  389.     }
  390.     public function getSummaryPaceMeals(): ?string
  391.     {
  392.         return $this->summaryPaceMeals;
  393.     }
  394.     public function setSummaryPaceMeals(?string $summaryPaceMeals): self
  395.     {
  396.         $this->summaryPaceMeals $summaryPaceMeals;
  397.         return $this;
  398.     }
  399.     public function getSummaryFrom(): ?string
  400.     {
  401.         return $this->summaryFrom;
  402.     }
  403.     public function setSummaryFrom(?string $summaryFrom): self
  404.     {
  405.         $this->summaryFrom $summaryFrom;
  406.         return $this;
  407.     }
  408.     public function getPriceNote(): ?string
  409.     {
  410.         return $this->priceNote;
  411.     }
  412.     public function setPriceNote(?string $priceNote): self
  413.     {
  414.         $this->priceNote $priceNote;
  415.         return $this;
  416.     }
  417.     /**
  418.      * @return Collection<int, Itinerary>
  419.      */
  420.     public function getItineraries(): Collection
  421.     {
  422.         return $this->itineraries;
  423.     }
  424.     public function addItinerary(Itinerary $itinerary): self
  425.     {
  426.         if (!$this->itineraries->contains($itinerary)) {
  427.             $this->itineraries[] = $itinerary;
  428.             $itinerary->setOffer($this);
  429.         }
  430.         return $this;
  431.     }
  432.     public function removeItinerary(Itinerary $itinerary): self
  433.     {
  434.         if ($this->itineraries->removeElement($itinerary)) {
  435.             // set the owning side to null (unless already changed)
  436.             if ($itinerary->getOffer() === $this) {
  437.                 $itinerary->setOffer(null);
  438.             }
  439.         }
  440.         return $this;
  441.     }
  442.     /**
  443.      * @return Collection<int, Highlight>
  444.      */
  445.     public function getHighlights(): Collection
  446.     {
  447.         return $this->highlights;
  448.     }
  449.     public function addHighlight(Highlight $highlight): self
  450.     {
  451.         if (!$this->highlights->contains($highlight)) {
  452.             $this->highlights[] = $highlight;
  453.             $highlight->setOffer($this);
  454.         }
  455.         return $this;
  456.     }
  457.     public function removeHighlight(Highlight $highlight): self
  458.     {
  459.         if ($this->highlights->removeElement($highlight)) {
  460.             // set the owning side to null (unless already changed)
  461.             if ($highlight->getOffer() === $this) {
  462.                 $highlight->setOffer(null);
  463.             }
  464.         }
  465.         return $this;
  466.     }
  467.     /**
  468.      * @return Collection<int, HebergemntOffer>
  469.      */
  470.     public function getHebergemntOffers(): Collection
  471.     {
  472.         return $this->hebergemntOffers;
  473.     }
  474.     public function addHebergemntOffer(HebergemntOffer $hebergemntOffer): self
  475.     {
  476.         if (!$this->hebergemntOffers->contains($hebergemntOffer)) {
  477.             $this->hebergemntOffers[] = $hebergemntOffer;
  478.             $hebergemntOffer->setOffer($this);
  479.         }
  480.         return $this;
  481.     }
  482.     public function removeHebergemntOffer(HebergemntOffer $hebergemntOffer): self
  483.     {
  484.         if ($this->hebergemntOffers->removeElement($hebergemntOffer)) {
  485.             // set the owning side to null (unless already changed)
  486.             if ($hebergemntOffer->getOffer() === $this) {
  487.                 $hebergemntOffer->setOffer(null);
  488.             }
  489.         }
  490.         return $this;
  491.     }
  492.     /**
  493.      * @return Collection<int, Flight>
  494.      */
  495.     public function getFlights(): Collection
  496.     {
  497.         return $this->flights;
  498.     }
  499.     public function addFlight(Flight $flight): self
  500.     {
  501.         if (!$this->flights->contains($flight)) {
  502.             $this->flights[] = $flight;
  503.             $flight->setOffer($this);
  504.         }
  505.         return $this;
  506.     }
  507.     public function removeFlight(Flight $flight): self
  508.     {
  509.         if ($this->flights->removeElement($flight)) {
  510.             // set the owning side to null (unless already changed)
  511.             if ($flight->getOffer() === $this) {
  512.                 $flight->setOffer(null);
  513.             }
  514.         }
  515.         return $this;
  516.     }
  517.     /**
  518.      * @return Collection<int, OfferInfo>
  519.      */
  520.     public function getOfferInfos(): Collection
  521.     {
  522.         return $this->offerInfos;
  523.     }
  524.     public function addOfferInfo(OfferInfo $offerInfo): self
  525.     {
  526.         if (!$this->offerInfos->contains($offerInfo)) {
  527.             $this->offerInfos[] = $offerInfo;
  528.             $offerInfo->setOffer($this);
  529.         }
  530.         return $this;
  531.     }
  532.     public function removeOfferInfo(OfferInfo $offerInfo): self
  533.     {
  534.         if ($this->offerInfos->removeElement($offerInfo)) {
  535.             // set the owning side to null (unless already changed)
  536.             if ($offerInfo->getOffer() === $this) {
  537.                 $offerInfo->setOffer(null);
  538.             }
  539.         }
  540.         return $this;
  541.     }
  542.     public function getBrochure(): ?string
  543.     {
  544.         return $this->brochure;
  545.     }
  546.     public function setBrochure(?string $brochure): self
  547.     {
  548.         $this->brochure $brochure;
  549.         return $this;
  550.     }
  551.     /**
  552.      * @return Collection<int, OurOffer>
  553.      */
  554.     public function getOurOffers(): Collection
  555.     {
  556.         return $this->ourOffers;
  557.     }
  558.     public function addOurOffer(OurOffer $ourOffer): self
  559.     {
  560.         if (!$this->ourOffers->contains($ourOffer)) {
  561.             $this->ourOffers[] = $ourOffer;
  562.             $ourOffer->setOffer($this);
  563.         }
  564.         return $this;
  565.     }
  566.     public function removeOurOffer(OurOffer $ourOffer): self
  567.     {
  568.         if ($this->ourOffers->removeElement($ourOffer)) {
  569.             // set the owning side to null (unless already changed)
  570.             if ($ourOffer->getOffer() === $this) {
  571.                 $ourOffer->setOffer(null);
  572.             }
  573.         }
  574.         return $this;
  575.     }
  576.     public function getOurOffer(): ?int
  577.     {
  578.         return $this->OurOffer;
  579.     }
  580.     public function setOurOffer(?int $OurOffer): self
  581.     {
  582.         $this->OurOffer $OurOffer;
  583.         return $this;
  584.     }
  585.     public function getFile(): ?string
  586.     {
  587.         return $this->file;
  588.     }
  589.     public function setFile(?string $file): self
  590.     {
  591.         $this->file $file;
  592.         return $this;
  593.     }
  594.     /**
  595.      * @return Collection<int, ItineraryPic>
  596.      */
  597.     public function getItineraryPics(): Collection
  598.     {
  599.         return $this->itineraryPics;
  600.     }
  601.     public function addItineraryPic(ItineraryPic $itineraryPic): self
  602.     {
  603.         if (!$this->itineraryPics->contains($itineraryPic)) {
  604.             $this->itineraryPics[] = $itineraryPic;
  605.             $itineraryPic->setOffer($this);
  606.         }
  607.         return $this;
  608.     }
  609.     public function removeItineraryPic(ItineraryPic $itineraryPic): self
  610.     {
  611.         if ($this->itineraryPics->removeElement($itineraryPic)) {
  612.             // set the owning side to null (unless already changed)
  613.             if ($itineraryPic->getOffer() === $this) {
  614.                 $itineraryPic->setOffer(null);
  615.             }
  616.         }
  617.         return $this;
  618.     }
  619.     public function getContinent(): ?Continent
  620.     {
  621.         return $this->continent;
  622.     }
  623.     public function setContinent(?Continent $continent): self
  624.     {
  625.         $this->continent $continent;
  626.         return $this;
  627.     }
  628.     public function getOSelection(): ?int
  629.     {
  630.         return $this->oSelection;
  631.     }
  632.     public function setOSelection(?int $oSelection): self
  633.     {
  634.         $this->oSelection $oSelection;
  635.         return $this;
  636.     }
  637.     public function getIncluded(): ?string
  638.     {
  639.         return $this->included;
  640.     }
  641.     public function setIncluded(?string $included): self
  642.     {
  643.         $this->included $included;
  644.         return $this;
  645.     }
  646.     public function getNotIncluded(): ?string
  647.     {
  648.         return $this->notIncluded;
  649.     }
  650.     public function setNotIncluded(?string $notIncluded): self
  651.     {
  652.         $this->notIncluded $notIncluded;
  653.         return $this;
  654.     }
  655.     public function getFormalities(): ?string
  656.     {
  657.         return $this->formalities;
  658.     }
  659.     public function setFormalities(?string $formalities): self
  660.     {
  661.         $this->formalities $formalities;
  662.         return $this;
  663.     }
  664.     public function getPaymentMethod(): ?string
  665.     {
  666.         return $this->paymentMethod;
  667.     }
  668.     public function setPaymentMethod(?string $paymentMethod): self
  669.     {
  670.         $this->paymentMethod $paymentMethod;
  671.         return $this;
  672.     }
  673.     public function getWidget(): ?string
  674.     {
  675.         return $this->widget;
  676.     }
  677.     public function setWidget(?string $widget): self
  678.     {
  679.         $this->widget $widget;
  680.         return $this;
  681.     }
  682.     public function getTitleSeo(): ?string
  683.     {
  684.         return $this->titleSeo;
  685.     }
  686.     public function setTitleSeo(?string $titleSeo): self
  687.     {
  688.         $this->titleSeo $titleSeo;
  689.         return $this;
  690.     }
  691.     public function getMetaTitle(): ?string
  692.     {
  693.         return $this->metaTitle;
  694.     }
  695.     public function setMetaTitle(?string $metaTitle): self
  696.     {
  697.         $this->metaTitle $metaTitle;
  698.         return $this;
  699.     }
  700.     public function getMetaDescription(): ?string
  701.     {
  702.         return $this->metaDescription;
  703.     }
  704.     public function setMetaDescription(?string $metaDescription): self
  705.     {
  706.         $this->metaDescription $metaDescription;
  707.         return $this;
  708.     }
  709.     public function getHighlightText(): ?string
  710.     {
  711.         return $this->highlightText;
  712.     }
  713.     public function setHighlightText(?string $highlightText): self
  714.     {
  715.         $this->highlightText $highlightText;
  716.         return $this;
  717.     }
  718.     public function getHighlightTitle(): ?string
  719.     {
  720.         return $this->highlightTitle;
  721.     }
  722.     public function setHighlightTitle(?string $highlightTitle): self
  723.     {
  724.         $this->highlightTitle $highlightTitle;
  725.         return $this;
  726.     }
  727. }