src/Entity/Playground.php line 15

  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Trait\MainTranslationTrait;
  4. use App\Entity\Translation\PlaygroundTranslation;
  5. use App\Repository\PlaygroundRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Translatable\Translatable;
  8. use Gedmo\Mapping\Annotation as Gedmo;
  9. #[ORM\Table(name'playground')]
  10. #[ORM\Entity(repositoryClassPlaygroundRepository::class)]
  11. #[Gedmo\TranslationEntity(class: PlaygroundTranslation::class)]
  12. class Playground implements Translatable
  13. {
  14.     use MainTranslationTrait;
  15.     const TRANSLATION_ENTITY PlaygroundTranslation::class;
  16.     #[ORM\Id]
  17.     #[ORM\GeneratedValue]
  18.     #[ORM\Column]
  19.     private ?int $id null;
  20.     #[ORM\Column(type'string'nullabletrue)]
  21.     #[Gedmo\Translatable]
  22.     private ?string $title null;
  23.     #[ORM\Column(type'text'nullabletrue)]
  24.     #[Gedmo\Translatable]
  25.     private ?string $description null;
  26.     #[ORM\Column(type'text'nullabletrue)]
  27.     #[Gedmo\Translatable]
  28.     private ?string $body null;
  29.     #[ORM\Column(type'string'nullabletrue)]
  30.     private ?string $image null;
  31.     #[ORM\Column(type'string'nullabletrue)]
  32.     private ?string $video null;
  33.     #[ORM\Column(type'boolean'nullabletrue)]
  34.     private ?bool $phoneAllowed true;
  35.     #[ORM\Column(type'json'nullabletrue)]
  36.     private ?array $images null;
  37.     #[ORM\Column(type'text'nullabletrue)]
  38.     #[Gedmo\Translatable]
  39.     private ?string $additionalInfo  null;
  40.     public function __toString(): string
  41.     {
  42.         return $this->title ?? "";
  43.     }
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getTitle(): ?string
  49.     {
  50.         return $this->title;
  51.     }
  52.     public function setTitle(?string $title): static
  53.     {
  54.         $this->title $title;
  55.         return $this;
  56.     }
  57.     public function getDescription(): ?string
  58.     {
  59.         return $this->description;
  60.     }
  61.     public function setDescription(?string $description): static
  62.     {
  63.         $this->description $description;
  64.         return $this;
  65.     }
  66.     public function getBody(): ?string
  67.     {
  68.         return $this->body;
  69.     }
  70.     public function setBody(?string $body): static
  71.     {
  72.         $this->body $body;
  73.         return $this;
  74.     }
  75.     public function getImage(): ?string
  76.     {
  77.         return $this->image;
  78.     }
  79.     public function setImage(?string $image): static
  80.     {
  81.         $this->image $image;
  82.         return $this;
  83.     }
  84.     public function getImages(): ?array
  85.     {
  86.         return $this->images;
  87.     }
  88.     public function setImages(?array $images): static
  89.     {
  90.         $this->images $images;
  91.         return $this;
  92.     }
  93.     public function getPhoneAllowed(): ?bool
  94.     {
  95.         return $this->phoneAllowed;
  96.     }
  97.     public function setPhoneAllowed(?bool $phoneAllowed): void
  98.     {
  99.         $this->phoneAllowed $phoneAllowed;
  100.     }
  101.     public function getAdditionalInfo(): ?string
  102.     {
  103.         return $this->additionalInfo;
  104.     }
  105.     public function setAdditionalInfo(?string $additionalInfo): void
  106.     {
  107.         $this->additionalInfo $additionalInfo;
  108.     }
  109.     public function getVideo(): ?string
  110.     {
  111.         return $this->video;
  112.     }
  113.     public function setVideo(?string $video): void
  114.     {
  115.         $this->video $video;
  116.     }
  117. }