src/Entity/WarEvent.php line 13

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\WarEventRepository;
  4. use DateTimeInterface;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. use Gedmo\Translatable\Translatable;
  9. #[ORM\Entity(repositoryClassWarEventRepository::class)]
  10. class WarEvent implements Translatable
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[Gedmo\Translatable]
  17.     #[ORM\Column(length255)]
  18.     private ?string $title null;
  19.     #[Gedmo\Translatable]
  20.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  21.     private ?string $headline null;
  22.     #[ORM\Column(length15)]
  23.     private ?string $year null;
  24.     #[ORM\Column(length255nullabletrue)]
  25.     private ?string $picture null;
  26.     #[Gedmo\Translatable]
  27.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  28.     private ?string $subtext null;
  29.     #[Gedmo\Translatable]
  30.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  31.     private ?string $content null;
  32.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  33.     private ?DateTimeInterface $date null;
  34.     #[ORM\Column]
  35.     private ?bool $visible null;
  36.     #[ORM\ManyToOne(inversedBy'warEvents')]
  37.     private ?Category $category null;
  38.     #[ORM\Column(typeTypes::TIME_MUTABLEnullabletrue)]
  39.     private ?DateTimeInterface $time null;
  40.     #[Gedmo\Locale]
  41.     private string $locale '';
  42.     #[ORM\Column(length255)]
  43.     private ?string $slug null;
  44.     public static function new(): WarEvent
  45.     {
  46.         return new WarEvent();
  47.     }
  48.     public function getId(): ?int
  49.     {
  50.         return $this->id;
  51.     }
  52.     public function getTitle(): ?string
  53.     {
  54.         return $this->title;
  55.     }
  56.     public function setTitle(string $title): self
  57.     {
  58.         $this->title $title;
  59.         return $this;
  60.     }
  61.     public function getHeadline(): ?string
  62.     {
  63.         return $this->headline;
  64.     }
  65.     public function setHeadline(?string $headline): self
  66.     {
  67.         $this->headline $headline;
  68.         return $this;
  69.     }
  70.     public function getYear(): ?string
  71.     {
  72.         return $this->year;
  73.     }
  74.     public function setYear(string $year): self
  75.     {
  76.         $this->year $year;
  77.         return $this;
  78.     }
  79.     public function getPicture(): ?string
  80.     {
  81.         return $this->picture;
  82.     }
  83.     public function setPicture(?string $picture): self
  84.     {
  85.         $this->picture $picture;
  86.         return $this;
  87.     }
  88.     public function getSubtext(): ?string
  89.     {
  90.         return $this->subtext;
  91.     }
  92.     public function setSubtext(?string $subtext): self
  93.     {
  94.         $this->subtext $subtext;
  95.         return $this;
  96.     }
  97.     public function getContent(): ?string
  98.     {
  99.         return $this->content;
  100.     }
  101.     public function setContent(?string $content): self
  102.     {
  103.         $this->content $content;
  104.         return $this;
  105.     }
  106.     public function getDate(): ?DateTimeInterface
  107.     {
  108.         return $this->date;
  109.     }
  110.     public function setDate(?DateTimeInterface $date): self
  111.     {
  112.         $this->date $date;
  113.         return $this;
  114.     }
  115.     public function isVisible(): ?bool
  116.     {
  117.         return $this->visible;
  118.     }
  119.     public function setVisible(bool $visible): self
  120.     {
  121.         $this->visible $visible;
  122.         return $this;
  123.     }
  124.     public function getCategory(): ?Category
  125.     {
  126.         return $this->category;
  127.     }
  128.     public function setCategory(?Category $category): self
  129.     {
  130.         $this->category $category;
  131.         return $this;
  132.     }
  133.     public function __toString(): string
  134.     {
  135.         return strval($this->title);
  136.     }
  137.     public function getTime(): ?DateTimeInterface
  138.     {
  139.         return $this->time;
  140.     }
  141.     public function setTime(?DateTimeInterface $time): self
  142.     {
  143.         $this->time $time;
  144.         return $this;
  145.     }
  146.     public function setTranslatableLocale($locale): void
  147.     {
  148.         $this->locale $locale;
  149.     }
  150.     public function getLocale(): string
  151.     {
  152.         return $this->locale;
  153.     }
  154.     public function getSlug(): ?string
  155.     {
  156.         return $this->slug;
  157.     }
  158.     public function setSlug(string $slug): self
  159.     {
  160.         $this->slug $slug;
  161.         return $this;
  162.     }
  163. }