src/Entity/Element.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ElementRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. use Gedmo\Mapping\Annotation as Gedmo;
  9. #[ORM\Entity(repositoryClassElementRepository::class)]
  10. #[Gedmo\Loggable]
  11. class Element
  12. {
  13.     const TYPE_ACTIVITY 'activities';
  14.     const TYPE_EVENTS 'events';
  15.     const TYPE_HOTEL 'hotels';
  16.     const TYPE_OTHER 'others';
  17.     const TYPE_PLACES 'places';
  18.     const TYPE_RESTAURANT 'restaurants';
  19.     const TYPE_SITE 'sites';
  20.     const TYPE_TOURAINEHOTEL 'tourainehotel';
  21.     const TYPE_TAGS 'tags';
  22.     const TYPE_UNKNOWN '__unknown__';
  23.     const TYPE_GITESFRANCE 'gites_france';
  24.     const TYPES_MSG = [
  25.         self::TYPE_ACTIVITY => 'activities',
  26.         self::TYPE_EVENTS => 'events',
  27.         self::TYPE_HOTEL => 'hotels',
  28.         self::TYPE_OTHER => 'others',
  29.         self::TYPE_PLACES => 'places',
  30.         self::TYPE_RESTAURANT => 'restaurants',
  31.         self::TYPE_SITE => 'sites',
  32.         self::TYPE_TAGS => 'tags',
  33.         self::TYPE_TOURAINEHOTEL => 'tourainehotel',
  34.         self::TYPE_UNKNOWN => '__unknown__',
  35.         self::TYPE_GITESFRANCE => 'gites_france'
  36.     ];
  37.     #[ORM\Id]
  38.     #[ORM\GeneratedValue]
  39.     #[ORM\Column(type'integer')]
  40.     #[Groups(['authorization''long-details''short-details'])]
  41.     private $id;
  42.     #[Gedmo\Locale]
  43.     private string $locale 'fr';
  44.     #[ORM\Column(type'string'length255)]
  45.     #[Groups(['export''long-details''short-details''authorization''favorites''smo''smo-geojson'])]
  46.     private $reference;
  47.     #[ORM\Column(type'string'length255nullabletrue)]
  48.     #[Gedmo\Versioned]
  49.     #[Groups(['authorization''export''long-details''short-details'])]
  50.     private $address;
  51.     #[ORM\Column(type'string'length255nullabletrue)]
  52.     #[Gedmo\Versioned]
  53.     #[Groups('authorization')]
  54.     private $address2;
  55.     #[ORM\Column(type'string'length255nullabletrue)]
  56.     #[Gedmo\Versioned]
  57.     #[Groups('authorization')]
  58.     private $address3;
  59.     #[ORM\Column(type'string'length10nullabletrue)]
  60.     #[Gedmo\Versioned]
  61.     #[Groups(['export''long-details''short-details''authorization'])]
  62.     private $zipCode;
  63.     #[ORM\Column(type'string'length255nullabletrue)]
  64.     #[Gedmo\Versioned]
  65.     #[Groups(['export''long-details''short-details''authorization'])]
  66.     private $town;
  67.     #[ORM\Column(type'string'length10nullabletrue)]
  68.     #[Gedmo\Versioned]
  69.     #[Groups('export')]
  70.     private $inseeCode;
  71.     #[ORM\Column(type'array'nullabletrue)]
  72.     #[Gedmo\Versioned]
  73.     #[Groups(['long-details''short-details'])]
  74.     private $phones = [];
  75.     #[ORM\Column(type'array'nullabletrue)]
  76.     #[Gedmo\Versioned]
  77.     #[Groups(['long-details''short-details'])]
  78.     private $mails = [];
  79.     #[ORM\Column(type'array'nullabletrue)]
  80.     #[Gedmo\Versioned]
  81.     #[Groups(['long-details''short-details'])]
  82.     private $website = [];
  83.     #[ORM\Column(type'float')]
  84.     #[Gedmo\Versioned]
  85.     #[Groups(['export''long-details''short-details''authorization''smo'])]
  86.     private $lat;
  87.     #[ORM\Column(type'float')]
  88.     #[Gedmo\Versioned]
  89.     #[Groups(['export''long-details''short-details''authorization''smo'])]
  90.     private $lng;
  91.     #[ORM\Column(type'integer')]
  92.     #[Gedmo\Versioned]
  93.     private $zone;
  94.     #[Gedmo\Translatable]
  95.     #[Groups(['export''long-details''short-details''authorization''geojson''favorites''smo''smo-geojson'])]
  96.     private $name;
  97.     #[ORM\Column(type'string'length255)]
  98.     #[Gedmo\Versioned]
  99.     private $nameFr;
  100.     #[ORM\Column(type'string'length255)]
  101.     #[Gedmo\Versioned]
  102.     private $nameEn;
  103.     #[Groups(['export''long-details''short-details''smo'])]
  104.     private $description;
  105.     #[ORM\Column(type'text'nullabletrue)]
  106.     #[Gedmo\Versioned]
  107.     private $descriptionFr;
  108.     #[ORM\Column(type'text'nullabletrue)]
  109.     #[Gedmo\Versioned]
  110.     private $descriptionEn;
  111.     #[ORM\Column(type'string'length255nullabletrue)]
  112.     #[Gedmo\Versioned]
  113.     #[Groups(['long-details''short-details''geojson''favorites''smo-geojson'])]
  114.     private $type;
  115.     #[ORM\Column(type'boolean'options: ["default" => false])]
  116.     #[Groups(['long-details''short-details'])]
  117.     private $hasPrice false;
  118.     #[ORM\Column(type'boolean'options: ["default" => false])]
  119.     #[Groups(['long-details''short-details'])]
  120.     private $hasSchedule false;
  121.     #[ORM\Column(type'boolean'options: ["default" => false])]
  122.     #[Groups(['long-details''short-details'])]
  123.     private $isOpen false;
  124.     #[ORM\Column(type'boolean'options: ["default" => true])]
  125.     #[Gedmo\Versioned]
  126.     private $display true;
  127.     #[ORM\Column(type'string'length255nullabletrue)]
  128.     #[Gedmo\Versioned]
  129.     #[Groups(['long-details''short-details'])]
  130.     private $pdm;
  131.     #[ORM\Column(type'datetime')]
  132.     private $createdAt;
  133.     #[ORM\Column(type'datetime')]
  134.     private $updatedAt;
  135.     #[ORM\OneToMany(mappedBy'element'targetEntityGoogleSearch::class)]
  136.     private $googleSearches;
  137.     #[ORM\ManyToMany(targetEntityNomenclatureCode::class, inversedBy'elements')]
  138.     private $nomenclatureCodes;
  139.     #[ORM\OneToMany(mappedBy'element'targetEntityPicture::class, cascade: ['persist''remove'], orphanRemovaltrue)]
  140.     private $pictures;
  141.     #[ORM\ManyToMany(targetEntityContact::class, mappedBy'elements'cascade: ['persist'])]
  142.     private $contacts;
  143.     #[ORM\Column(type'text'nullabletrue)]
  144.     #[Gedmo\Versioned]
  145.     private $anecdoteFr;
  146.     #[ORM\Column(type'text'nullabletrue)]
  147.     #[Gedmo\Versioned]
  148.     private $anecdoteEn;
  149.     #[ORM\ManyToMany(targetEntityUser::class, mappedBy'element')]
  150.     private $users;
  151.     #[ORM\OneToMany(mappedBy'element'targetEntityElementSource::class, orphanRemovaltrue)]
  152.     private $elementSources;
  153.     #[ORM\OneToOne(mappedBy'element'targetEntityAuthorization::class, cascade: ['persist''remove'])]
  154.     #[Groups('authorization')]
  155.     private $authorization;
  156.     #[ORM\OneToMany(mappedBy'element'targetEntitySchedule::class, orphanRemovaltrue)]
  157.     private $schedules;
  158.     #[ORM\OneToMany(mappedBy'element'targetEntityPrice::class, orphanRemovaltrue)]
  159.     private $prices;
  160.     #[ORM\OneToMany(mappedBy'elementStart'targetEntityElementDistance::class, orphanRemovaltrue)]
  161.     private $elementStartDistances;
  162.     #[ORM\OneToMany(mappedBy'elementEnd'targetEntityElementDistance::class)]
  163.     private $elementEndDistances;
  164.     #[ORM\ManyToMany(targetEntityFavorite::class, mappedBy'element')]
  165.     private $favorites;
  166.     #[Groups(['long-details''short-details''favorites'])]
  167.     private $distance;
  168.     #[ORM\OneToMany(mappedBy'element'targetEntityTerminal::class, orphanRemovaltrue)]
  169.     private $terminals;
  170.     #[ORM\OneToMany(mappedBy'element'targetEntityInformation::class, orphanRemovaltrue)]
  171.     private $informations;
  172.     #[ORM\Column(type'boolean'nullabletrue)]
  173.     private $groupmentTouraineHotels;
  174.     #[ORM\OneToMany(mappedBy'element'targetEntityCoordinates::class)]
  175.     private $coordinates;
  176.     #[ORM\OneToMany(mappedBy'element'targetEntityTask::class)]
  177.     private $tasks;
  178.     #[ORM\OneToOne(mappedBy'element'targetEntityTypeHotel::class, cascade: ['persist''remove'])]
  179.     private $typeHotel;
  180.     #[ORM\OneToOne(inversedBy'element'targetEntityThMember::class, cascade: ['persist''remove'])]
  181.     private $thMember;
  182.     #[ORM\Column(type'string'length255nullabletrue)]
  183.     private $nameDe;
  184.     #[ORM\Column(type'text'nullabletrue)]
  185.     private $descriptionDe;
  186.     #[ORM\Column(type'string'length255nullabletrue)]
  187.     private $nameNl;
  188.     #[ORM\Column(type'text'nullabletrue)]
  189.     private $descriptionNl;
  190.     #[ORM\Column(type'string'length255nullabletrue)]
  191.     private $nameIt;
  192.     #[ORM\Column(type'text'nullabletrue)]
  193.     private $descriptionIt;
  194.     #[ORM\Column(type'string'length255nullabletrue)]
  195.     private $nameEs;
  196.     #[ORM\Column(type'text'nullabletrue)]
  197.     private $descriptionEs;
  198.     #[ORM\Column(type'string'length255nullabletrue)]
  199.     private $namePt;
  200.     #[ORM\Column(type'text'nullabletrue)]
  201.     private $descriptionPt;
  202.     #[ORM\OneToOne(mappedBy'element'targetEntityHasConcierge::class, cascade: ['persist''remove'])]
  203.     private $hasConcierge;
  204.     #[ORM\OneToMany(mappedBy'element'targetEntityManual::class)]
  205.     private $manuals;
  206.     #[ORM\OneToMany(mappedBy'element'targetEntityError::class, orphanRemovaltrue)]
  207.     private $errors;
  208.     public function __construct()
  209.     {
  210.         $this->googleSearches = new ArrayCollection();
  211.         $this->nomenclatureCodes = new ArrayCollection();
  212.         $this->pictures = new ArrayCollection();
  213.         $this->contacts = new ArrayCollection();
  214.         $this->users = new ArrayCollection();
  215.         $this->elementSources = new ArrayCollection();
  216.         $this->schedules = new ArrayCollection();
  217.         $this->prices = new ArrayCollection();
  218.         $this->elementStartDistances = new ArrayCollection();
  219.         $this->elementEndDistances = new ArrayCollection();
  220.         $this->favorites = new ArrayCollection();
  221.         $this->terminals = new ArrayCollection();
  222.         $this->informations = new ArrayCollection();
  223.         $this->coordinates = new ArrayCollection();
  224.         $this->tasks = new ArrayCollection();
  225.         $this->manuals = new ArrayCollection();
  226.         $this->errors = new ArrayCollection();
  227.     }
  228.     public function getId(): ?int
  229.     {
  230.         return $this->id;
  231.     }
  232.     /**
  233.      * @param $locale
  234.      * @param bool $force
  235.      * @return Element
  236.      */
  237.     public function setTranslatableLocale($localebool $force false): self
  238.     {
  239.         $this->locale $locale;
  240.         if ($force) {
  241.             if ('fr' === $locale) {
  242.                 $this->name $this->nameFr;
  243.                 $this->description $this->descriptionFr;
  244.             } else {
  245.                 $this->name $this->nameEn;
  246.                 $this->description $this->descriptionEn;
  247.             }
  248.         }
  249.         return $this;
  250.     }
  251.     public function getReference(): ?string
  252.     {
  253.         return $this->reference;
  254.     }
  255.     public function setReference(string $reference): self
  256.     {
  257.         $this->reference $reference;
  258.         return $this;
  259.     }
  260.     public function getAddress(): ?string
  261.     {
  262.         return $this->address;
  263.     }
  264.     public function setAddress(?string $address): self
  265.     {
  266.         $this->address $address;
  267.         return $this;
  268.     }
  269.     public function getAddress2(): ?string
  270.     {
  271.         return $this->address2;
  272.     }
  273.     public function setAddress2(?string $address2): self
  274.     {
  275.         $this->address2 $address2;
  276.         return $this;
  277.     }
  278.     public function getAddress3(): ?string
  279.     {
  280.         return $this->address3;
  281.     }
  282.     public function setAddress3(?string $address3): self
  283.     {
  284.         $this->address3 $address3;
  285.         return $this;
  286.     }
  287.     public function getZipCode(): ?string
  288.     {
  289.         return $this->zipCode;
  290.     }
  291.     public function setZipCode(?string $zipCode): self
  292.     {
  293.         $this->zipCode $zipCode;
  294.         return $this;
  295.     }
  296.     public function getTown(): ?string
  297.     {
  298.         return $this->town;
  299.     }
  300.     public function setTown(?string $town): self
  301.     {
  302.         $this->town $town;
  303.         return $this;
  304.     }
  305.     public function getInseeCode(): ?string
  306.     {
  307.         return $this->inseeCode;
  308.     }
  309.     public function setInseeCode(?string $inseeCode): self
  310.     {
  311.         $this->inseeCode $inseeCode;
  312.         return $this;
  313.     }
  314.     public function getPhones(): ?array
  315.     {
  316.         return $this->phones;
  317.     }
  318.     public function setPhones(?array $phones): self
  319.     {
  320.         $this->phones $phones;
  321.         return $this;
  322.     }
  323.     public function getMails(): ?array
  324.     {
  325.         return $this->mails;
  326.     }
  327.     public function setMails(?array $mails): self
  328.     {
  329.         $this->mails $mails;
  330.         return $this;
  331.     }
  332.     public function getWebsite(): ?array
  333.     {
  334.         return $this->website;
  335.     }
  336.     public function setWebsite(?array $website): self
  337.     {
  338.         $this->website $website;
  339.         return $this;
  340.     }
  341.     public function getLat(): ?float
  342.     {
  343.         return $this->lat;
  344.     }
  345.     public function setLat(float $lat): self
  346.     {
  347.         $this->lat $lat;
  348.         return $this;
  349.     }
  350.     public function getLng(): ?float
  351.     {
  352.         return $this->lng;
  353.     }
  354.     public function setLng(float $lng): self
  355.     {
  356.         $this->lng $lng;
  357.         return $this;
  358.     }
  359.     public function getZone(): ?int
  360.     {
  361.         return $this->zone;
  362.     }
  363.     public function setZone(int $zone): self
  364.     {
  365.         $this->zone $zone;
  366.         return $this;
  367.     }
  368.     /**
  369.      * @return null|string
  370.      */
  371.     public function getName(): ?string
  372.     {
  373.         return $this->name;
  374.     }
  375.     /**
  376.      * @param string $name
  377.      * @param string|null $locale
  378.      * @return Element
  379.      */
  380.     public function setName(string $namestring $locale null): self
  381.     {
  382.         $locale $locale ?? $this->locale;
  383.         if ('fr' === $locale) {
  384.             $this->nameFr $name;
  385.         } else {
  386.             $this->nameEn $name;
  387.         }
  388.         $this->name $name;
  389.         return $this;
  390.     }
  391.     public function getNameFr(): ?string
  392.     {
  393.         return $this->nameFr;
  394.     }
  395.     public function setNameFr(string $nameFr): self
  396.     {
  397.         $this->nameFr $nameFr;
  398.         return $this;
  399.     }
  400.     public function getNameEn(): ?string
  401.     {
  402.         return $this->nameEn;
  403.     }
  404.     public function setNameEn(string $nameEn): self
  405.     {
  406.         $this->nameEn $nameEn;
  407.         return $this;
  408.     }
  409.     /**
  410.      * @return null|string
  411.      */
  412.     public function getDescription(): ?string
  413.     {
  414.         return $this->description;
  415.     }
  416.     /**
  417.      * @param string $description
  418.      * @param string|null $locale
  419.      * @return Element
  420.      */
  421.     public function setDescription(string $descriptionstring $locale null): self
  422.     {
  423.         $locale $locale ?? $this->locale;
  424.         if ('fr' === $locale) {
  425.             $this->descriptionFr $description;
  426.         } else {
  427.             $this->descriptionEn $description;
  428.         }
  429.         $this->description $description;
  430.         return $this;
  431.     }
  432.     public function getDescriptionFr(): ?string
  433.     {
  434.         return $this->descriptionFr;
  435.     }
  436.     public function setDescriptionFr(?string $descriptionFr): self
  437.     {
  438.         $this->descriptionFr $descriptionFr;
  439.         return $this;
  440.     }
  441.     public function getDescriptionEn(): ?string
  442.     {
  443.         return $this->descriptionEn;
  444.     }
  445.     public function setDescriptionEn(?string $descriptionEn): self
  446.     {
  447.         $this->descriptionEn $descriptionEn;
  448.         return $this;
  449.     }
  450.     public function getType(): ?string
  451.     {
  452.         return $this->type;
  453.     }
  454.     public function setType(?string $type): self
  455.     {
  456.         $this->type $type;
  457.         return $this;
  458.     }
  459.     public function getHasPrice(): ?bool
  460.     {
  461.         return $this->hasPrice;
  462.     }
  463.     public function setHasPrice(bool $hasPrice): self
  464.     {
  465.         $this->hasPrice $hasPrice;
  466.         return $this;
  467.     }
  468.     public function getHasSchedule(): ?bool
  469.     {
  470.         return $this->hasSchedule;
  471.     }
  472.     public function setHasSchedule(bool $hasSchedule): self
  473.     {
  474.         $this->hasSchedule $hasSchedule;
  475.         return $this;
  476.     }
  477.     public function getIsOpen(): ?bool
  478.     {
  479.         return $this->isOpen;
  480.     }
  481.     public function setIsOpen(bool $isOpen): self
  482.     {
  483.         $this->isOpen $isOpen;
  484.         return $this;
  485.     }
  486.     public function getDisplay(): ?bool
  487.     {
  488.         return $this->display;
  489.     }
  490.     public function setDisplay(bool $display): self
  491.     {
  492.         $this->display $display;
  493.         return $this;
  494.     }
  495.     public function getPdm(): ?string
  496.     {
  497.         return $this->pdm;
  498.     }
  499.     public function setPdm(?string $pdm): self
  500.     {
  501.         $this->pdm $pdm;
  502.         return $this;
  503.     }
  504.     public function getCreatedAt(): ?\DateTimeInterface
  505.     {
  506.         return $this->createdAt;
  507.     }
  508.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  509.     {
  510.         $this->createdAt $createdAt;
  511.         return $this;
  512.     }
  513.     public function getUpdatedAt(): ?\DateTimeInterface
  514.     {
  515.         return $this->updatedAt;
  516.     }
  517.     public function setUpdatedAt(\DateTimeInterface $updatedAt): self
  518.     {
  519.         $this->updatedAt $updatedAt;
  520.         return $this;
  521.     }
  522.     public function getDistance(): ?string
  523.     {
  524.         return $this->distance;
  525.     }
  526.     public function setDistance(?string $distance): self
  527.     {
  528.         $this->distance $distance;
  529.         return $this;
  530.     }
  531.     /**
  532.      * @return Collection|GoogleSearch[]
  533.      */
  534.     public function getGoogleSearches(): Collection
  535.     {
  536.         return $this->googleSearches;
  537.     }
  538.     public function addGoogleSearch(GoogleSearch $googleSearch): self
  539.     {
  540.         if (!$this->googleSearches->contains($googleSearch)) {
  541.             $this->googleSearches[] = $googleSearch;
  542.             $googleSearch->setElement($this);
  543.         }
  544.         return $this;
  545.     }
  546.     public function removeGoogleSearch(GoogleSearch $googleSearch): self
  547.     {
  548.         if ($this->googleSearches->removeElement($googleSearch)) {
  549.             // set the owning side to null (unless already changed)
  550.             if ($googleSearch->getElement() === $this) {
  551.                 $googleSearch->setElement(null);
  552.             }
  553.         }
  554.         return $this;
  555.     }
  556.     /**
  557.      * @return Collection|NomenclatureCode[]
  558.      */
  559.     public function getNomenclatureCode(): Collection
  560.     {
  561.         return $this->nomenclatureCodes;
  562.     }
  563.     public function addNomenclatureCode(NomenclatureCode $nomenclatureCode): self
  564.     {
  565.         if (!$this->nomenclatureCodes->contains($nomenclatureCode)) {
  566.             $this->nomenclatureCodes[] = $nomenclatureCode;
  567.         }
  568.         return $this;
  569.     }
  570.     public function addNomenclatureCodes(array $nomenclatureCodes): self
  571.     {
  572.         foreach($nomenclatureCodes as $nomenclatureCode) {
  573.             $this->addNomenclatureCode($nomenclatureCode);
  574.         }
  575.         return $this;
  576.     }
  577.     public function removeNomenclatureCode(NomenclatureCode $nomenclatureCode): self
  578.     {
  579.         $this->nomenclatureCodes->removeElement($nomenclatureCode);
  580.         return $this;
  581.     }
  582.     public function removeNomenclatureCodes(): self
  583.     {
  584.         $nomenclatureCodes $this->getNomenclatureCode();
  585.         foreach($nomenclatureCodes as $nomenclatureCode) {
  586.             $this->removeNomenclatureCode($nomenclatureCode);
  587.         }
  588.         return $this;
  589.     }
  590.     /**
  591.      * @return Collection|NomenclatureCode[]
  592.      */
  593.     public function getSpokenlanguages(): Collection
  594.     {
  595.         $list = new ArrayCollection;
  596.         foreach ($this->nomenclatureCodes as $nomenclatureCode) {
  597.             if (NomenclatureCode::SPOKENLANGUAGES !== $nomenclatureCode->getShortCode()
  598.                 && str_contains($nomenclatureCode->getShortCode(), NomenclatureCode::SPOKENLANGUAGES)) {
  599.                 $list[] = $nomenclatureCode;
  600.             }
  601.         }
  602.         return $list;
  603.     }
  604.     /**
  605.      * @param NomenclatureCode $nomenclatureCode
  606.      * @return Element
  607.      */
  608.     public function addSpokenlanguage(NomenclatureCode $nomenclatureCode): self
  609.     {
  610.         if (!$this->nomenclatureCodes->contains($nomenclatureCode)) {
  611.             $this->nomenclatureCodes[] = $nomenclatureCode;
  612.         }
  613.         return $this;
  614.     }
  615.     /**
  616.      * @param array $nomenclatureCodes
  617.      * @return Element
  618.      */
  619.     public function addSpokenlanguages(array $nomenclatureCodes): self
  620.     {
  621.         foreach ($nomenclatureCodes as $nomenclatureCode) {
  622.             $this->addSpokenlanguage($nomenclatureCode);
  623.         }
  624.         return $this;
  625.     }
  626.     /**
  627.      * @param NomenclatureCode $nomenclatureCode
  628.      * @return Element
  629.      */
  630.     public function removeSpokenlanguage(NomenclatureCode $nomenclatureCode): self
  631.     {
  632.         if ($this->nomenclatureCodes->contains($nomenclatureCode)) {
  633.             $this->nomenclatureCodes->removeElement($nomenclatureCode);
  634.         }
  635.         return $this;
  636.     }
  637.     /**
  638.      * @return Collection|NomenclatureCode[]
  639.      */
  640.     public function getGroupments(): Collection
  641.     {
  642.         $list = new ArrayCollection;
  643.         foreach ($this->nomenclatureCodes as $nomenclatureCode) {
  644.             if (NomenclatureCode::GROUPMENTS !== $nomenclatureCode->getShortCode()
  645.                 && str_contains($nomenclatureCode->getShortCode(), NomenclatureCode::GROUPMENTS)) {
  646.                 $list[] = $nomenclatureCode;
  647.             }
  648.         }
  649.         return $list;
  650.     }
  651.     /**
  652.      * @param NomenclatureCode $nomenclatureCode
  653.      * @return Element
  654.      */
  655.     public function addGroupment(NomenclatureCode $nomenclatureCode): self
  656.     {
  657.         if (!$this->nomenclatureCodes->contains($nomenclatureCode)) {
  658.             $this->nomenclatureCodes[] = $nomenclatureCode;
  659.         }
  660.         return $this;
  661.     }
  662.     /**
  663.      * @param array $nomenclatureCodes
  664.      * @return Element
  665.      */
  666.     public function addGroupments(array $nomenclatureCodes): self
  667.     {
  668.         foreach ($nomenclatureCodes as $nomenclatureCode) {
  669.             $this->addGroupment($nomenclatureCode);
  670.         }
  671.         return $this;
  672.     }
  673.     /**
  674.      * @param NomenclatureCode $nomenclatureCode
  675.      * @return Element
  676.      */
  677.     public function removeGroupment(NomenclatureCode $nomenclatureCode): self
  678.     {
  679.         if ($this->nomenclatureCodes->contains($nomenclatureCode)) {
  680.             $this->nomenclatureCodes->removeElement($nomenclatureCode);
  681.         }
  682.         return $this;
  683.     }
  684.     /**
  685.      * @return Collection|NomenclatureCode[]
  686.      */
  687.     public function getPublics(): Collection
  688.     {
  689.         $list = new ArrayCollection;
  690.         foreach ($this->nomenclatureCodes as $nomenclatureCode) {
  691.             if (NomenclatureCode::PUBLIC !== $nomenclatureCode->getShortCode()
  692.                 && str_contains($nomenclatureCode->getShortCode(), NomenclatureCode::PUBLIC)) {
  693.                 $list[] = $nomenclatureCode;
  694.             }
  695.         }
  696.         return $list;
  697.     }
  698.     /**
  699.      * @param NomenclatureCode $nomenclatureCode
  700.      * @return Element
  701.      */
  702.     public function addPublic(NomenclatureCode $nomenclatureCode): self
  703.     {
  704.         if (!$this->nomenclatureCodes->contains($nomenclatureCode)) {
  705.             $this->nomenclatureCodes[] = $nomenclatureCode;
  706.         }
  707.         return $this;
  708.     }
  709.     /**
  710.      * @param array $nomenclatureCodes
  711.      * @return Element
  712.      */
  713.     public function addPublics(array $nomenclatureCodes): self
  714.     {
  715.         foreach ($nomenclatureCodes as $nomenclatureCode) {
  716.             $this->addPublic($nomenclatureCode);
  717.         }
  718.         return $this;
  719.     }
  720.     /**
  721.      * @param NomenclatureCode $nomenclatureCode
  722.      * @return Element
  723.      */
  724.     public function removePublic(NomenclatureCode $nomenclatureCode): self
  725.     {
  726.         if ($this->nomenclatureCodes->contains($nomenclatureCode)) {
  727.             $this->nomenclatureCodes->removeElement($nomenclatureCode);
  728.         }
  729.         return $this;
  730.     }
  731.     /**
  732.      * @return Collection|NomenclatureCode[]
  733.      */
  734.     public function getPayments(): Collection
  735.     {
  736.         $list = new ArrayCollection;
  737.         foreach ($this->nomenclatureCodes as $nomenclatureCode) {
  738.             if (NomenclatureCode::MEANSOFPAYMENT !== $nomenclatureCode->getShortCode()
  739.                 && str_contains($nomenclatureCode->getShortCode(), NomenclatureCode::MEANSOFPAYMENT)) {
  740.                 $list[] = $nomenclatureCode;
  741.             }
  742.         }
  743.         return $list;
  744.     }
  745.     /**
  746.      * @param NomenclatureCode $nomenclatureCode
  747.      * @return Element
  748.      */
  749.     public function addPayment(NomenclatureCode $nomenclatureCode): self
  750.     {
  751.         if (!$this->nomenclatureCodes->contains($nomenclatureCode)) {
  752.             $this->nomenclatureCodes[] = $nomenclatureCode;
  753.         }
  754.         return $this;
  755.     }
  756.     /**
  757.      * @param array $nomenclatureCodes
  758.      * @return Element
  759.      */
  760.     public function addPayments(array $nomenclatureCodes): self
  761.     {
  762.         foreach ($nomenclatureCodes as $nomenclatureCode) {
  763.             $this->addPayment($nomenclatureCode);
  764.         }
  765.         return $this;
  766.     }
  767.     /**
  768.      * @param NomenclatureCode $nomenclatureCode
  769.      * @return Element
  770.      */
  771.     public function removePayment(NomenclatureCode $nomenclatureCode): self
  772.     {
  773.         if ($this->nomenclatureCodes->contains($nomenclatureCode)) {
  774.             $this->nomenclatureCodes->removeElement($nomenclatureCode);
  775.         }
  776.         return $this;
  777.     }
  778.     /**
  779.      * @return Collection|NomenclatureCode[]
  780.      */
  781.     public function getEquipments(): Collection
  782.     {
  783.         $list = new ArrayCollection;
  784.         foreach ($this->nomenclatureCodes as $nomenclatureCode) {
  785.             if (NomenclatureCode::EQUIPMENTS !== $nomenclatureCode->getShortCode()
  786.                 && str_contains($nomenclatureCode->getShortCode(), NomenclatureCode::EQUIPMENTS)) {
  787.                 $list[] = $nomenclatureCode;
  788.             }
  789.         }
  790.         return $list;
  791.     }
  792.     /**
  793.      * @param NomenclatureCode $nomenclatureCode
  794.      * @return Element
  795.      */
  796.     public function addEquipment(NomenclatureCode $nomenclatureCode): self
  797.     {
  798.         if (!$this->nomenclatureCodes->contains($nomenclatureCode)) {
  799.             $this->nomenclatureCodes[] = $nomenclatureCode;
  800.         }
  801.         return $this;
  802.     }
  803.     /**
  804.      * @param array $nomenclatureCodes
  805.      * @return Element
  806.      */
  807.     public function addEquipments(array $nomenclatureCodes): self
  808.     {
  809.         foreach ($nomenclatureCodes as $nomenclatureCode) {
  810.             $this->addEquipment($nomenclatureCode);
  811.         }
  812.         return $this;
  813.     }
  814.     /**
  815.      * @param NomenclatureCode $nomenclatureCode
  816.      * @return Element
  817.      */
  818.     public function removeEquipment(NomenclatureCode $nomenclatureCode): self
  819.     {
  820.         if ($this->nomenclatureCodes->contains($nomenclatureCode)) {
  821.             $this->nomenclatureCodes->removeElement($nomenclatureCode);
  822.         }
  823.         return $this;
  824.     }
  825.     /**
  826.      * @return Collection|NomenclatureCode[]
  827.      */
  828.     public function getServices(): Collection
  829.     {
  830.         $list = new ArrayCollection;
  831.         foreach ($this->nomenclatureCodes as $nomenclatureCode) {
  832.             if (NomenclatureCode::SERVICES !== $nomenclatureCode->getShortCode()
  833.                 && str_contains($nomenclatureCode->getShortCode(), NomenclatureCode::SERVICES)) {
  834.                 $list[] = $nomenclatureCode;
  835.             }
  836.         }
  837.         return $list;
  838.     }
  839.     /**
  840.      * @param NomenclatureCode $nomenclatureCode
  841.      * @return Element
  842.      */
  843.     public function addService(NomenclatureCode $nomenclatureCode): self
  844.     {
  845.         if (!$this->nomenclatureCodes->contains($nomenclatureCode)) {
  846.             $this->nomenclatureCodes[] = $nomenclatureCode;
  847.         }
  848.         return $this;
  849.     }
  850.     /**
  851.      * @param array $nomenclatureCodes
  852.      * @return Element
  853.      */
  854.     public function addServices(array $nomenclatureCodes): self
  855.     {
  856.         foreach ($nomenclatureCodes as $nomenclatureCode) {
  857.             $this->addService($nomenclatureCode);
  858.         }
  859.         return $this;
  860.     }
  861.     /**
  862.      * @param NomenclatureCode $nomenclatureCode
  863.      * @return Element
  864.      */
  865.     public function removeService(NomenclatureCode $nomenclatureCode): self
  866.     {
  867.         if ($this->nomenclatureCodes->contains($nomenclatureCode)) {
  868.             $this->nomenclatureCodes->removeElement($nomenclatureCode);
  869.         }
  870.         return $this;
  871.     }
  872.     /**
  873.      * @return Collection|NomenclatureCode[]
  874.      */
  875.     public function getAccessibilities(): Collection
  876.     {
  877.         $list = new ArrayCollection;
  878.         foreach ($this->nomenclatureCodes as $nomenclatureCode) {
  879.             if (NomenclatureCode::ACCESSIBILITIES !== $nomenclatureCode->getShortCode()
  880.                 && str_contains($nomenclatureCode->getShortCode(), NomenclatureCode::ACCESSIBILITIES)) {
  881.                 $list[] = $nomenclatureCode;
  882.             }
  883.         }
  884.         return $list;
  885.     }
  886.     /**
  887.      * @param NomenclatureCode $nomenclatureCode
  888.      * @return Element
  889.      */
  890.     public function addAccessibility(NomenclatureCode $nomenclatureCode): self
  891.     {
  892.         if (!$this->nomenclatureCodes->contains($nomenclatureCode)) {
  893.             $this->nomenclatureCodes[] = $nomenclatureCode;
  894.         }
  895.         return $this;
  896.     }
  897.     /**
  898.      * @param array $nomenclatureCodes
  899.      * @return Element
  900.      */
  901.     public function addAccessibilities(array $nomenclatureCodes): self
  902.     {
  903.         foreach ($nomenclatureCodes as $nomenclatureCode) {
  904.             $this->addAccessibility($nomenclatureCode);
  905.         }
  906.         return $this;
  907.     }
  908.     /**
  909.      * @param NomenclatureCode $nomenclatureCode
  910.      * @return Element
  911.      */
  912.     public function removeAccessibility(NomenclatureCode $nomenclatureCode): self
  913.     {
  914.         if ($this->nomenclatureCodes->contains($nomenclatureCode)) {
  915.             $this->nomenclatureCodes->removeElement($nomenclatureCode);
  916.         }
  917.         return $this;
  918.     }
  919.     /**
  920.      * @return Collection|NomenclatureCode[]
  921.      */
  922.     public function getCategories(): Collection
  923.     {
  924.         $list = new ArrayCollection;
  925.         foreach ($this->nomenclatureCodes as $nomenclatureCode) {
  926.             if (NomenclatureCode::CATEGORIES[$this->getType()] !== $nomenclatureCode->getShortCode()
  927.                 && str_contains($nomenclatureCode->getShortCode(), NomenclatureCode::CATEGORIES[$this->getType()])) {
  928.                 $list[] = $nomenclatureCode;
  929.             }
  930.         }
  931.         return $list;
  932.     }
  933.     /**
  934.      * @param NomenclatureCode $nomenclatureCode
  935.      * @return Element
  936.      */
  937.     public function addCategory(NomenclatureCode $nomenclatureCode): self
  938.     {
  939.         if (!$this->nomenclatureCodes->contains($nomenclatureCode)) {
  940.             $this->nomenclatureCodes[] = $nomenclatureCode;
  941.         }
  942.         return $this;
  943.     }
  944.     /**
  945.      * @param array $nomenclatureCodes
  946.      * @return Element
  947.      */
  948.     public function addCategories(array $nomenclatureCodes): self
  949.     {
  950.         foreach ($nomenclatureCodes as $nomenclatureCode) {
  951.             $this->addCategory($nomenclatureCode);
  952.         }
  953.         return $this;
  954.     }
  955.     /**
  956.      * @param NomenclatureCode $nomenclatureCode
  957.      * @return Element
  958.      */
  959.     public function removeCategory(NomenclatureCode $nomenclatureCode): self
  960.     {
  961.         if ($this->nomenclatureCodes->contains($nomenclatureCode)) {
  962.             $this->nomenclatureCodes->removeElement($nomenclatureCode);
  963.         }
  964.         return $this;
  965.     }
  966.     /**
  967.      * @return Collection|Picture[]
  968.      */
  969.     public function getPictures(): Collection
  970.     {
  971.         return $this->pictures;
  972.     }
  973.     public function addPicture(Picture $picture): self
  974.     {
  975.         if (!$this->pictures->contains($picture)) {
  976.             $this->pictures[] = $picture;
  977.             $picture->setElement($this);
  978.         }
  979.         return $this;
  980.     }
  981.     public function removePicture(Picture $picture): self
  982.     {
  983.         if ($this->pictures->removeElement($picture)) {
  984.             // set the owning side to null (unless already changed)
  985.             if ($picture->getElement() === $this) {
  986.                 $picture->setElement(null);
  987.             }
  988.         }
  989.         return $this;
  990.     }
  991.     public function getMainPicture(): Picture|null
  992.     {
  993.         foreach ($this->pictures as $picture) {
  994.             if ($picture->getMain()) {
  995.                 return $picture;
  996.             }
  997.         }
  998.         return null;
  999.     }
  1000.     /**
  1001.      * @return Collection|Contact[]
  1002.      */
  1003.     public function getContacts(): Collection
  1004.     {
  1005.         return $this->contacts;
  1006.     }
  1007.     public function addContact(Contact $contact): self
  1008.     {
  1009.         if (!$this->contacts->contains($contact)) {
  1010.             $this->contacts[] = $contact;
  1011.             $contact->addElement($this);
  1012.         }
  1013.         return $this;
  1014.     }
  1015.     public function removeContact(Contact $contact): self
  1016.     {
  1017.         if ($this->contacts->removeElement($contact)) {
  1018.             $contact->removeElement($this);
  1019.         }
  1020.         return $this;
  1021.     }
  1022.     public function getAnecdoteFr(): ?string
  1023.     {
  1024.         return $this->anecdoteFr;
  1025.     }
  1026.     public function setAnecdoteFr(?string $anecdoteFr): self
  1027.     {
  1028.         $this->anecdoteFr $anecdoteFr;
  1029.         return $this;
  1030.     }
  1031.     public function getAnecdoteEn(): ?string
  1032.     {
  1033.         return $this->anecdoteEn;
  1034.     }
  1035.     public function setAnecdoteEn(?string $anecdoteEn): self
  1036.     {
  1037.         $this->anecdoteEn $anecdoteEn;
  1038.         return $this;
  1039.     }
  1040.     /**
  1041.      * @return Collection|NomenclatureCode[]
  1042.      */
  1043.     public function getAudiolanguages(): Collection
  1044.     {
  1045.         $list = new ArrayCollection;
  1046.         foreach ($this->nomenclatureCodes as $nomenclatureCode) {
  1047.             if (NomenclatureCode::AUDIOLANGUAGES !== $nomenclatureCode->getShortCode()
  1048.                 && str_contains($nomenclatureCode->getShortCode(), NomenclatureCode::AUDIOLANGUAGES)) {
  1049.                 $list[] = $nomenclatureCode;
  1050.             }
  1051.         }
  1052.         return $list;
  1053.     }
  1054.     /**
  1055.      * @param NomenclatureCode $nomenclatureCode
  1056.      * @return Element
  1057.      */
  1058.     public function addAudiolanguage(NomenclatureCode $nomenclatureCode): self
  1059.     {
  1060.         if (!$this->nomenclatureCodes->contains($nomenclatureCode)) {
  1061.             $this->nomenclatureCodes[] = $nomenclatureCode;
  1062.         }
  1063.         return $this;
  1064.     }
  1065.     /**
  1066.      * @param array $nomenclatureCodes
  1067.      * @return Element
  1068.      */
  1069.     public function addAudiolanguages(array $nomenclatureCodes): self
  1070.     {
  1071.         foreach ($nomenclatureCodes as $nomenclatureCode) {
  1072.             $this->addAudiolanguage($nomenclatureCode);
  1073.         }
  1074.         return $this;
  1075.     }
  1076.     /**
  1077.      * @param NomenclatureCode $nomenclatureCode
  1078.      * @return Element
  1079.      */
  1080.     public function removeAudiolanguage(NomenclatureCode $nomenclatureCode): self
  1081.     {
  1082.         if ($this->nomenclatureCodes->contains($nomenclatureCode)) {
  1083.             $this->nomenclatureCodes->removeElement($nomenclatureCode);
  1084.         }
  1085.         return $this;
  1086.     }
  1087.     /**
  1088.      * @return Collection|NomenclatureCode[]
  1089.      */
  1090.     public function getVisitlanguages(): Collection
  1091.     {
  1092.         $list = new ArrayCollection;
  1093.         foreach ($this->nomenclatureCodes as $nomenclatureCode) {
  1094.             if (NomenclatureCode::VISITLANGUAGES !== $nomenclatureCode->getShortCode()
  1095.                 && str_contains($nomenclatureCode->getShortCode(), NomenclatureCode::VISITLANGUAGES)) {
  1096.                 $list[] = $nomenclatureCode;
  1097.             }
  1098.         }
  1099.         return $list;
  1100.     }
  1101.     /**
  1102.      * @param NomenclatureCode $nomenclatureCode
  1103.      * @return Element
  1104.      */
  1105.     public function addVisitlanguage(NomenclatureCode $nomenclatureCode): self
  1106.     {
  1107.         if (!$this->nomenclatureCodes->contains($nomenclatureCode)) {
  1108.             $this->nomenclatureCodes[] = $nomenclatureCode;
  1109.         }
  1110.         return $this;
  1111.     }
  1112.     /**
  1113.      * @param array $nomenclatureCodes
  1114.      * @return Element
  1115.      */
  1116.     public function addVisitlanguages(array $nomenclatureCodes): self
  1117.     {
  1118.         foreach ($nomenclatureCodes as $nomenclatureCode) {
  1119.             $this->addVisitlanguage($nomenclatureCode);
  1120.         }
  1121.         return $this;
  1122.     }
  1123.     /**
  1124.      * @param NomenclatureCode $nomenclatureCode
  1125.      * @return Element
  1126.      */
  1127.     public function removeVisitlanguage(NomenclatureCode $nomenclatureCode): self
  1128.     {
  1129.         if ($this->nomenclatureCodes->contains($nomenclatureCode)) {
  1130.             $this->nomenclatureCodes->removeElement($nomenclatureCode);
  1131.         }
  1132.         return $this;
  1133.     }
  1134.     /**
  1135.      * @return Collection|User[]
  1136.      */
  1137.     public function getUsers(): Collection
  1138.     {
  1139.         return $this->users;
  1140.     }
  1141.     public function addUser(User $user): self
  1142.     {
  1143.         if (!$this->users->contains($user)) {
  1144.             $this->users[] = $user;
  1145.             $user->addElement($this);
  1146.         }
  1147.         return $this;
  1148.     }
  1149.     public function removeUser(User $user): self
  1150.     {
  1151.         if ($this->users->removeElement($user)) {
  1152.             $user->removeElement($this);
  1153.         }
  1154.         return $this;
  1155.     }
  1156.     public function hasUser(User $user): bool
  1157.     {
  1158.         return $this->users->contains($user);
  1159.     }
  1160.     /**
  1161.      * @return Collection|ElementSource[]
  1162.      */
  1163.     public function getElementSources(): Collection
  1164.     {
  1165.         return $this->elementSources;
  1166.     }
  1167.     public function addElementSource(ElementSource $elementSource): self
  1168.     {
  1169.         if (!$this->elementSources->contains($elementSource)) {
  1170.             $this->elementSources[] = $elementSource;
  1171.             $elementSource->setElement($this);
  1172.         }
  1173.         return $this;
  1174.     }
  1175.     public function removeElementSource(ElementSource $elementSource): self
  1176.     {
  1177.         if ($this->elementSources->removeElement($elementSource)) {
  1178.             // set the owning side to null (unless already changed)
  1179.             if ($elementSource->getElement() === $this) {
  1180.                 $elementSource->setElement(null);
  1181.             }
  1182.         }
  1183.         return $this;
  1184.     }
  1185.     public function getAuthorization(): ?Authorization
  1186.     {
  1187.         return $this->authorization;
  1188.     }
  1189.     public function setAuthorization(Authorization $authorization): self
  1190.     {
  1191.         // set the owning side of the relation if necessary
  1192.         if ($authorization->getElement() !== $this) {
  1193.             $authorization->setElement($this);
  1194.         }
  1195.         $this->authorization $authorization;
  1196.         return $this;
  1197.     }
  1198.     /**
  1199.      * @return Collection|Schedule[]
  1200.      */
  1201.     public function getSchedules(): Collection
  1202.     {
  1203.         return $this->schedules;
  1204.     }
  1205.     public function addSchedule(Schedule $schedule): self
  1206.     {
  1207.         if (!$this->schedules->contains($schedule)) {
  1208.             $this->schedules[] = $schedule;
  1209.             $schedule->setElement($this);
  1210.         }
  1211.         return $this;
  1212.     }
  1213.     public function removeSchedule(Schedule $schedule): self
  1214.     {
  1215.         if ($this->schedules->removeElement($schedule)) {
  1216.             // set the owning side to null (unless already changed)
  1217.             if ($schedule->getElement() === $this) {
  1218.                 $schedule->setElement(null);
  1219.             }
  1220.         }
  1221.         return $this;
  1222.     }
  1223.     /**
  1224.      * @return Collection|Price[]
  1225.      */
  1226.     public function getPrices(): Collection
  1227.     {
  1228.         return $this->prices;
  1229.     }
  1230.     public function addPrice(Price $price): self
  1231.     {
  1232.         if (!$this->prices->contains($price)) {
  1233.             $this->prices[] = $price;
  1234.             $price->setElement($this);
  1235.         }
  1236.         return $this;
  1237.     }
  1238.     public function removePrice(Price $price): self
  1239.     {
  1240.         if ($this->prices->removeElement($price)) {
  1241.             // set the owning side to null (unless already changed)
  1242.             if ($price->getElement() === $this) {
  1243.                 $price->setElement(null);
  1244.             }
  1245.         }
  1246.         return $this;
  1247.     }
  1248.     /**
  1249.      * @return Collection|ElementDistance[]
  1250.      */
  1251.     public function getElementStartDistances(): Collection
  1252.     {
  1253.         return $this->elementStartDistances;
  1254.     }
  1255.     public function addElementStartDistance(ElementDistance $elementStartDistance): self
  1256.     {
  1257.         if (!$this->elementStartDistances->contains($elementStartDistance)) {
  1258.             $this->elementStartDistances[] = $elementStartDistance;
  1259.             $elementStartDistance->setElementStart($this);
  1260.         }
  1261.         return $this;
  1262.     }
  1263.     public function removeElementStartDistance(ElementDistance $elementStartDistance): self
  1264.     {
  1265.         if ($this->elementStartDistances->removeElement($elementStartDistance)) {
  1266.             // set the owning side to null (unless already changed)
  1267.             if ($elementStartDistance->getElementStart() === $this) {
  1268.                 $elementStartDistance->setElementStart(null);
  1269.             }
  1270.         }
  1271.         return $this;
  1272.     }
  1273.     /**
  1274.      * @return Collection|ElementDistance[]
  1275.      */
  1276.     public function getElementEndDistances(): Collection
  1277.     {
  1278.         return $this->elementEndDistances;
  1279.     }
  1280.     public function addElementEndDistance(ElementDistance $elementEndDistance): self
  1281.     {
  1282.         if (!$this->elementEndDistances->contains($elementEndDistance)) {
  1283.             $this->elementEndDistances[] = $elementEndDistance;
  1284.             $elementEndDistance->setElementEnd($this);
  1285.         }
  1286.         return $this;
  1287.     }
  1288.     public function removeElementEndDistance(ElementDistance $elementEndDistance): self
  1289.     {
  1290.         if ($this->elementEndDistances->removeElement($elementEndDistance)) {
  1291.             // set the owning side to null (unless already changed)
  1292.             if ($elementEndDistance->getElementEnd() === $this) {
  1293.                 $elementEndDistance->setElementEnd(null);
  1294.             }
  1295.         }
  1296.         return $this;
  1297.     }
  1298.     /**
  1299.      * @return Collection|Favorite[]
  1300.      */
  1301.     public function getFavorites(): Collection
  1302.     {
  1303.         return $this->favorites;
  1304.     }
  1305.     public function addFavorite(Favorite $favorite): self
  1306.     {
  1307.         if (!$this->favorites->contains($favorite)) {
  1308.             $this->favorites[] = $favorite;
  1309.             $favorite->addElement($this);
  1310.         }
  1311.         return $this;
  1312.     }
  1313.     public function removeFavorite(Favorite $favorite): self
  1314.     {
  1315.         if ($this->favorites->removeElement($favorite)) {
  1316.             $favorite->removeElement($this);
  1317.         }
  1318.         return $this;
  1319.     }
  1320.     /**
  1321.      * @return Collection|Terminal[]
  1322.      */
  1323.     public function getTerminals(): Collection
  1324.     {
  1325.         return $this->terminals;
  1326.     }
  1327.     public function addTerminal(Terminal $terminal): self
  1328.     {
  1329.         if (!$this->terminals->contains($terminal)) {
  1330.             $this->terminals[] = $terminal;
  1331.             $terminal->setElement($this);
  1332.         }
  1333.         return $this;
  1334.     }
  1335.     public function removeTerminal(Terminal $terminal): self
  1336.     {
  1337.         if ($this->terminals->removeElement($terminal)) {
  1338.             // set the owning side to null (unless already changed)
  1339.             if ($terminal->getElement() === $this) {
  1340.                 $terminal->setElement(null);
  1341.             }
  1342.         }
  1343.         return $this;
  1344.     }
  1345.     /**
  1346.      * @return Collection|Information[]
  1347.      */
  1348.     public function getInformations(): Collection
  1349.     {
  1350.         return $this->informations;
  1351.     }
  1352.     public function addInformation(Information $information): self
  1353.     {
  1354.         if (!$this->informations->contains($information)) {
  1355.             $this->informations[] = $information;
  1356.             $information->setElement($this);
  1357.         }
  1358.         return $this;
  1359.     }
  1360.     public function removeInformation(Information $information): self
  1361.     {
  1362.         if ($this->informations->removeElement($information)) {
  1363.             // set the owning side to null (unless already changed)
  1364.             if ($information->getElement() === $this) {
  1365.                 $information->setElement(null);
  1366.             }
  1367.         }
  1368.         return $this;
  1369.     }
  1370.     public function getGroupmentTouraineHotels(): ?bool
  1371.     {
  1372.         return $this->groupmentTouraineHotels;
  1373.     }
  1374.     public function setGroupmentTouraineHotels(?bool $groupmentTouraineHotels): self
  1375.     {
  1376.         $this->groupmentTouraineHotels $groupmentTouraineHotels;
  1377.         return $this;
  1378.     }
  1379.     /**
  1380.      * @return Collection|Coordinates[]
  1381.      */
  1382.     public function getCoordinates(): Collection
  1383.     {
  1384.         return $this->coordinates;
  1385.     }
  1386.     public function addCoordinate(Coordinates $coordinate): self
  1387.     {
  1388.         if (!$this->coordinates->contains($coordinate)) {
  1389.             $this->coordinates[] = $coordinate;
  1390.             $coordinate->setElement($this);
  1391.         }
  1392.         return $this;
  1393.     }
  1394.     public function removeCoordinate(Coordinates $coordinate): self
  1395.     {
  1396.         if ($this->coordinates->removeElement($coordinate)) {
  1397.             // set the owning side to null (unless already changed)
  1398.             if ($coordinate->getElement() === $this) {
  1399.                 $coordinate->setElement(null);
  1400.             }
  1401.         }
  1402.         return $this;
  1403.     }
  1404.     /**
  1405.      * @return Collection|Task[]
  1406.      */
  1407.     public function getTasks(): Collection
  1408.     {
  1409.         return $this->tasks;
  1410.     }
  1411.     public function addTask(Task $task): self
  1412.     {
  1413.         if (!$this->tasks->contains($task)) {
  1414.             $this->tasks[] = $task;
  1415.             $task->setElement($this);
  1416.         }
  1417.         return $this;
  1418.     }
  1419.     public function removeTask(Task $task): self
  1420.     {
  1421.         if ($this->tasks->removeElement($task)) {
  1422.             // set the owning side to null (unless already changed)
  1423.             if ($task->getElement() === $this) {
  1424.                 $task->setElement(null);
  1425.             }
  1426.         }
  1427.         return $this;
  1428.     }
  1429.     public function getTypeHotel(): ?TypeHotel
  1430.     {
  1431.         return $this->typeHotel;
  1432.     }
  1433.     public function setTypeHotel(TypeHotel $typeHotel): self
  1434.     {
  1435.         // set the owning side of the relation if necessary
  1436.         if ($typeHotel->getElement() !== $this) {
  1437.             $typeHotel->setElement($this);
  1438.         }
  1439.         $this->typeHotel $typeHotel;
  1440.         return $this;
  1441.     }
  1442.     public function getThMember(): ?ThMember
  1443.     {
  1444.         return $this->thMember;
  1445.     }
  1446.     public function setThMember(?ThMember $thMember): self
  1447.     {
  1448.         $this->thMember $thMember;
  1449.         return $this;
  1450.     }
  1451.     public function getNameDe(): ?string
  1452.     {
  1453.         return $this->nameDe;
  1454.     }
  1455.     public function setNameDe(?string $nameDe): self
  1456.     {
  1457.         $this->nameDe $nameDe;
  1458.         return $this;
  1459.     }
  1460.     public function getDescriptionDe(): ?string
  1461.     {
  1462.         return $this->descriptionDe;
  1463.     }
  1464.     public function setDescriptionDe(?string $descriptionDe): self
  1465.     {
  1466.         $this->descriptionDe $descriptionDe;
  1467.         return $this;
  1468.     }
  1469.     public function getNameNl(): ?string
  1470.     {
  1471.         return $this->nameNl;
  1472.     }
  1473.     public function setNameNl(?string $nameNl): self
  1474.     {
  1475.         $this->nameNl $nameNl;
  1476.         return $this;
  1477.     }
  1478.     public function getDescriptionNl(): ?string
  1479.     {
  1480.         return $this->descriptionNl;
  1481.     }
  1482.     public function setDescriptionNl(?string $descriptionNl): self
  1483.     {
  1484.         $this->descriptionNl $descriptionNl;
  1485.         return $this;
  1486.     }
  1487.     public function getNameIt(): ?string
  1488.     {
  1489.         return $this->nameIt;
  1490.     }
  1491.     public function setNameIt(?string $nameIt): self
  1492.     {
  1493.         $this->nameIt $nameIt;
  1494.         return $this;
  1495.     }
  1496.     public function getDescriptionIt(): ?string
  1497.     {
  1498.         return $this->descriptionIt;
  1499.     }
  1500.     public function setDescriptionIt(?string $descriptionIt): self
  1501.     {
  1502.         $this->descriptionIt $descriptionIt;
  1503.         return $this;
  1504.     }
  1505.     public function getNameEs(): ?string
  1506.     {
  1507.         return $this->nameEs;
  1508.     }
  1509.     public function setNameEs(?string $nameEs): self
  1510.     {
  1511.         $this->nameEs $nameEs;
  1512.         return $this;
  1513.     }
  1514.     public function getDescriptionEs(): ?string
  1515.     {
  1516.         return $this->descriptionEs;
  1517.     }
  1518.     public function setDescriptionEs(?string $descriptionEs): self
  1519.     {
  1520.         $this->descriptionEs $descriptionEs;
  1521.         return $this;
  1522.     }
  1523.     public function getNamePt(): ?string
  1524.     {
  1525.         return $this->namePt;
  1526.     }
  1527.     public function setNamePt(?string $namePt): self
  1528.     {
  1529.         $this->namePt $namePt;
  1530.         return $this;
  1531.     }
  1532.     public function getDescriptionPt(): ?string
  1533.     {
  1534.         return $this->descriptionPt;
  1535.     }
  1536.     public function setDescriptionPt(?string $descriptionPt): self
  1537.     {
  1538.         $this->descriptionPt $descriptionPt;
  1539.         return $this;
  1540.     }
  1541.     public function getHasConcierge(): ?HasConcierge
  1542.     {
  1543.         return $this->hasConcierge;
  1544.     }
  1545.     public function setHasConcierge(HasConcierge $hasConcierge): self
  1546.     {
  1547.         // set the owning side of the relation if necessary
  1548.         if ($hasConcierge->getElement() !== $this) {
  1549.             $hasConcierge->setElement($this);
  1550.         }
  1551.         $this->hasConcierge $hasConcierge;
  1552.         return $this;
  1553.     }
  1554.     /**
  1555.      * @return Collection
  1556.      */
  1557.     public function getManuals(): Collection
  1558.     {
  1559.         return $this->manuals;
  1560.     }
  1561.     public function addManual(Manual $manual): self
  1562.     {
  1563.         if (!$this->manuals->contains($manual)) {
  1564.             $this->manuals[] = $manual;
  1565.             $manual->setElement($this);
  1566.         }
  1567.         return $this;
  1568.     }
  1569.     public function removeManual(Manual $manual): self
  1570.     {
  1571.         if ($this->manuals->removeElement($manual)) {
  1572.             // set the owning side to null (unless already changed)
  1573.             if ($manual->getElement() === $this) {
  1574.                 $manual->setElement(null);
  1575.             }
  1576.         }
  1577.         return $this;
  1578.     }
  1579.     /**
  1580.      * @return Collection|Error[]
  1581.      */
  1582.     public function getErrors(): Collection
  1583.     {
  1584.         return $this->errors;
  1585.     }
  1586.     public function addError(Error $error): self
  1587.     {
  1588.         if (!$this->errors->contains($error)) {
  1589.             $this->errors[] = $error;
  1590.             $error->setElement($this);
  1591.         }
  1592.         return $this;
  1593.     }
  1594.     public function removeError(Error $error): self
  1595.     {
  1596.         if ($this->errors->removeElement($error)) {
  1597.             // set the owning side to null (unless already changed)
  1598.             if ($error->getElement() === $this) {
  1599.                 $error->setElement(null);
  1600.             }
  1601.         }
  1602.         return $this;
  1603.     }
  1604. }