src/Entity/Attractions.php line 17

  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Trait\MainTranslationTrait;
  4. use App\Entity\Translation\AttractionsTranslation;
  5. use App\Repository\AttractionsRepository;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Gedmo\Mapping\Annotation as Gedmo;
  10. use Gedmo\Translatable\Translatable;
  11. #[ORM\Table(name'attractions')]
  12. #[ORM\Entity(repositoryClassAttractionsRepository::class)]
  13. #[Gedmo\TranslationEntity(class: AttractionsTranslation::class)]
  14. class Attractions implements Translatable
  15. {
  16.     use MainTranslationTrait;
  17.     const TRANSLATION_ENTITY AttractionsTranslation::class;
  18.     #[ORM\Id]
  19.     #[ORM\GeneratedValue]
  20.     #[ORM\Column]
  21.     private ?int $id null;
  22.     #[ORM\Column(type'string'nullabletrue)]
  23.     #[Gedmo\Translatable]
  24.     private ?string $title null;
  25.     #[ORM\Column(type'string',uniquetrue)]
  26.     #[Gedmo\Slug(fields: ['title'])]
  27.     private string $slug;
  28.     #[ORM\Column(type'text'nullabletrue)]
  29.     #[Gedmo\Translatable]
  30.     private ?string $description null;
  31.     #[ORM\Column(type'text'nullabletrue)]
  32.     #[Gedmo\Translatable]
  33.     private ?string $body null;
  34.     #[ORM\Column(type'string'nullabletrue)]
  35.     private ?string $image null;
  36.     #[ORM\Column(type'string'nullabletrue)]
  37.     private ?string $video null;
  38.     #[ORM\Column(type'boolean'nullabletrue)]
  39.     private ?bool $phoneAllowed true;
  40.     #[ORM\Column(type'json'nullabletrue)]
  41.     private ?array $images null;
  42.     #[ORM\Column(type'string'nullabletrue)]
  43.     #[Gedmo\Translatable]
  44.     private ?string $speed null;
  45.     #[ORM\Column(type'string'nullabletrue)]
  46.     private ?string $power null;
  47.     #[ORM\Column(type'string'nullabletrue)]
  48.     #[Gedmo\Translatable]
  49.     private ?string $attractionHeight null;
  50.     #[ORM\Column(type'string'nullabletrue)]
  51.     private ?string $maximumSeatWeight null;
  52.     #[ORM\Column(type'string'nullabletrue)]
  53.     #[Gedmo\Translatable]
  54.     private ?string $minHeightWithAdult null;
  55.     #[ORM\Column(type'string'nullabletrue)]
  56.     #[Gedmo\Translatable]
  57.     private ?string $maxHeight null;
  58.     #[ORM\Column(type'string'nullabletrue)]
  59.     #[Gedmo\Translatable]
  60.     private ?string $minHeightAlone null;
  61.     #[ORM\Column(type'text'nullabletrue)]
  62.     #[Gedmo\Translatable]
  63.     private ?string $additionalInfo  null;
  64.     #[ORM\Column(type'boolean'nullabletrue)]
  65.     private ?bool $showInSlider null;
  66.     #[ORM\Column(type'integer'nullabletrue)]
  67.     private ?int $orderNumber null;
  68.     #[ORM\Column(type'string',length160nullabletrue)]
  69.     #[Gedmo\Translatable]
  70.     private ?string $metaKeywords null;
  71.     #[ORM\Column(type'string',length160nullabletrue)]
  72.     #[Gedmo\Translatable]
  73.     private ?string $metaDescription null;
  74.     #[ORM\ManyToOne(targetEntityAttractionTypes::class, inversedBy'attraction')]
  75.     private ?AttractionTypes $attractionTypes null;
  76.     #[ORM\ManyToMany(targetEntityProhibitedCases::class, inversedBy'attractions')]
  77.     #[ORM\JoinTable(name'attractions_prohibited_cases')]
  78.     private $prohibitedCases;
  79.     public function __construct()
  80.     {
  81.         $this->prohibitedCases = new ArrayCollection();
  82.     }
  83.     public function __toString(): string
  84.     {
  85.         return $this->title ?? "";
  86.     }
  87.     public function getId(): ?int
  88.     {
  89.         return $this->id;
  90.     }
  91.     public function getTitle(): ?string
  92.     {
  93.         return $this->title;
  94.     }
  95.     public function setTitle(?string $title): static
  96.     {
  97.         $this->title $title;
  98.         return $this;
  99.     }
  100.     public function getDescription(): ?string
  101.     {
  102.         return $this->description;
  103.     }
  104.     public function setDescription(?string $description): static
  105.     {
  106.         $this->description $description;
  107.         return $this;
  108.     }
  109.     public function getBody(): ?string
  110.     {
  111.         return $this->body;
  112.     }
  113.     public function setBody(?string $body): static
  114.     {
  115.         $this->body $body;
  116.         return $this;
  117.     }
  118.     public function getImage(): ?string
  119.     {
  120.         return $this->image;
  121.     }
  122.     public function setImage(?string $image): static
  123.     {
  124.         $this->image $image;
  125.         return $this;
  126.     }
  127.     public function getImages(): ?array
  128.     {
  129.         return $this->images;
  130.     }
  131.     public function setImages(?array $images): static
  132.     {
  133.         $this->images $images;
  134.         return $this;
  135.     }
  136.     public function getSpeed(): ?string
  137.     {
  138.         return $this->speed;
  139.     }
  140.     public function setSpeed(?string $speed): static
  141.     {
  142.         $this->speed $speed;
  143.         return $this;
  144.     }
  145.     public function getPower(): ?string
  146.     {
  147.         return $this->power;
  148.     }
  149.     public function setPower(?string $power): static
  150.     {
  151.         $this->power $power;
  152.         return $this;
  153.     }
  154.     public function getAttractionHeight(): ?string
  155.     {
  156.         return $this->attractionHeight;
  157.     }
  158.     public function setAttractionHeight(?string $attractionHeight): static
  159.     {
  160.         $this->attractionHeight $attractionHeight;
  161.         return $this;
  162.     }
  163.     public function getMinHeightWithAdult(): ?string
  164.     {
  165.         return $this->minHeightWithAdult;
  166.     }
  167.     public function setMinHeightWithAdult(?string $minHeightWithAdult): static
  168.     {
  169.         $this->minHeightWithAdult $minHeightWithAdult;
  170.         return $this;
  171.     }
  172.     public function getMinHeightAlone(): ?string
  173.     {
  174.         return $this->minHeightAlone;
  175.     }
  176.     public function setMinHeightAlone(?string $minHeightAlone): static
  177.     {
  178.         $this->minHeightAlone $minHeightAlone;
  179.         return $this;
  180.     }
  181.     public function isShowInSlider(): ?bool
  182.     {
  183.         return $this->showInSlider;
  184.     }
  185.     public function setShowInSlider(?bool $showInSlider): static
  186.     {
  187.         $this->showInSlider $showInSlider;
  188.         return $this;
  189.     }
  190.     public function getOrderNumber(): ?int
  191.     {
  192.         return $this->orderNumber;
  193.     }
  194.     public function setOrderNumber(?int $orderNumber): static
  195.     {
  196.         $this->orderNumber $orderNumber;
  197.         return $this;
  198.     }
  199.     public function getAttractionTypes(): ?AttractionTypes
  200.     {
  201.         return $this->attractionTypes;
  202.     }
  203.     public function setAttractionTypes(?AttractionTypes $attractionTypes): static
  204.     {
  205.         $this->attractionTypes $attractionTypes;
  206.         return $this;
  207.     }
  208.     public function getSlug(): string
  209.     {
  210.         return $this->slug;
  211.     }
  212.     public function setSlug(string $slug): void
  213.     {
  214.         $this->slug $slug;
  215.     }
  216.     public function getPhoneAllowed(): ?bool
  217.     {
  218.         return $this->phoneAllowed;
  219.     }
  220.     public function setPhoneAllowed(?bool $phoneAllowed): void
  221.     {
  222.         $this->phoneAllowed $phoneAllowed;
  223.     }
  224.     public function getMaximumSeatWeight(): ?string
  225.     {
  226.         return $this->maximumSeatWeight;
  227.     }
  228.     public function setMaximumSeatWeight(?string $maximumSeatWeight): void
  229.     {
  230.         $this->maximumSeatWeight $maximumSeatWeight;
  231.     }
  232.     public function getMaxHeight(): ?string
  233.     {
  234.         return $this->maxHeight;
  235.     }
  236.     public function setMaxHeight(?string $maxHeight): void
  237.     {
  238.         $this->maxHeight $maxHeight;
  239.     }
  240.     public function getMetaKeywords(): ?string
  241.     {
  242.         return $this->metaKeywords;
  243.     }
  244.     public function setMetaKeywords(?string $metaKeywords): void
  245.     {
  246.         $this->metaKeywords $metaKeywords;
  247.     }
  248.     public function getMetaDescription(): ?string
  249.     {
  250.         return $this->metaDescription;
  251.     }
  252.     public function setMetaDescription(?string $metaDescription): void
  253.     {
  254.         $this->metaDescription $metaDescription;
  255.     }
  256.     public function getAdditionalInfo(): ?string
  257.     {
  258.         return $this->additionalInfo;
  259.     }
  260.     public function setAdditionalInfo(?string $additionalInfo): void
  261.     {
  262.         $this->additionalInfo $additionalInfo;
  263.     }
  264.     public function getVideo(): ?string
  265.     {
  266.         return $this->video;
  267.     }
  268.     public function setVideo(?string $video): void
  269.     {
  270.         $this->video $video;
  271.     }
  272.     public function isPhoneAllowed(): ?bool
  273.     {
  274.         return $this->phoneAllowed;
  275.     }
  276.     /**
  277.      * @return Collection<int, ProhibitedCases>
  278.      */
  279.     public function getProhibitedCases(): Collection
  280.     {
  281.         return $this->prohibitedCases;
  282.     }
  283.     public function addProhibitedCase(ProhibitedCases $prohibitedCase): static
  284.     {
  285.         if (!$this->prohibitedCases->contains($prohibitedCase)) {
  286.             $this->prohibitedCases->add($prohibitedCase);
  287.         }
  288.         return $this;
  289.     }
  290.     public function removeProhibitedCase(ProhibitedCases $prohibitedCase): static
  291.     {
  292.         $this->prohibitedCases->removeElement($prohibitedCase);
  293.         return $this;
  294.     }
  295. }