src/Entity/Event.php line 15

  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Trait\MainTranslationTrait;
  4. use App\Entity\Translation\EventTranslation;
  5. use App\Repository\EventRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. use Gedmo\Translatable\Translatable;
  9. #[ORM\Table(name'event')]
  10. #[ORM\Entity(repositoryClassEventRepository::class)]
  11. #[Gedmo\TranslationEntity(class: EventTranslation::class)]
  12. class Event implements Translatable
  13. {
  14.     use MainTranslationTrait;
  15.     const TRANSLATION_ENTITY EventTranslation::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'string',uniquetrue)]
  24.     #[Gedmo\Slug(fields: ['title'])]
  25.     private string $slug;
  26.     #[ORM\Column(type'text'nullabletrue)]
  27.     #[Gedmo\Translatable]
  28.     private ?string $body null;
  29.     #[ORM\Column(type'text'nullabletrue)]
  30.     #[Gedmo\Translatable]
  31.     private ?string $additionalInfo null;
  32.     #[ORM\Column(type'string',length160nullabletrue)]
  33.     #[Gedmo\Translatable]
  34.     private ?string $metaKeywords null;
  35.     #[ORM\Column(type'string',length160nullabletrue)]
  36.     #[Gedmo\Translatable]
  37.     private ?string $metaDescription null;
  38.     #[ORM\Column(type'json'nullabletrue)]
  39.     #[Gedmo\Translatable]
  40.     private ?array $eventImages null;
  41.     #[ORM\Column(type'string'nullabletrue)]
  42.     #[Gedmo\Translatable]
  43.     private ?string $image null;
  44.     #[ORM\Column(type'string'nullabletrue)]
  45.     private ?string $video null;
  46.     public function getId(): ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function __toString(): string
  51.     {
  52.         return $this->title ?? "";
  53.     }
  54.     public function getTitle(): ?string
  55.     {
  56.         return $this->title;
  57.     }
  58.     public function setTitle(?string $title): void
  59.     {
  60.         $this->title $title;
  61.     }
  62.     public function getSlug(): string
  63.     {
  64.         return $this->slug;
  65.     }
  66.     public function setSlug(string $slug): void
  67.     {
  68.         $this->slug $slug;
  69.     }
  70.     public function getBody(): ?string
  71.     {
  72.         return $this->body;
  73.     }
  74.     public function setBody(?string $body): void
  75.     {
  76.         $this->body $body;
  77.     }
  78.     public function getImage(): ?string
  79.     {
  80.         return $this->image;
  81.     }
  82.     public function setImage(?string $image): void
  83.     {
  84.         $this->image $image;
  85.     }
  86.     public function getVideo(): ?string
  87.     {
  88.         return $this->video;
  89.     }
  90.     public function setVideo(?string $video): void
  91.     {
  92.         $this->video $video;
  93.     }
  94.     public function getMetaKeywords(): ?string
  95.     {
  96.         return $this->metaKeywords;
  97.     }
  98.     public function setMetaKeywords(?string $metaKeywords): void
  99.     {
  100.         $this->metaKeywords $metaKeywords;
  101.     }
  102.     public function getMetaDescription(): ?string
  103.     {
  104.         return $this->metaDescription;
  105.     }
  106.     public function setMetaDescription(?string $metaDescription): void
  107.     {
  108.         $this->metaDescription $metaDescription;
  109.     }
  110.     public function getEventImages(): ?array
  111.     {
  112.         return $this->eventImages;
  113.     }
  114.     public function setEventImages(?array $eventImages): void
  115.     {
  116.         $this->eventImages $eventImages;
  117.     }
  118.     public function getAdditionalInfo(): ?string
  119.     {
  120.         return $this->additionalInfo;
  121.     }
  122.     public function setAdditionalInfo(?string $additionalInfo): void
  123.     {
  124.         $this->additionalInfo $additionalInfo;
  125.     }
  126. }