src/Entity/AbstractOption.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Translatable\Translatable;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use App\Entity\Trait\TranslatableLocale;
  7. use App\Repository\AbstractOptionRepository;
  8. /**
  9.  * @ORM\Entity
  10.  * @ORM\InheritanceType("SINGLE_TABLE")
  11.  * @ORM\DiscriminatorColumn(name="discr", type="string")
  12.  */
  13. class AbstractOption
  14. {
  15.     use TranslatableLocale;
  16.     
  17.     /**
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue
  20.      * @ORM\Column(type="integer")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @Gedmo\Translatable
  25.      * @ORM\Column(type="string", length=255)
  26.      */
  27.     private $label;
  28.     /**
  29.      * @Gedmo\Translatable
  30.      * @ORM\Column(type="text", nullable=true)
  31.      */
  32.     private $description;
  33.     /**
  34.      * @Gedmo\Translatable
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $placeholderCommentary;
  38.     /**
  39.      * @ORM\Column(type="datetime", nullable=true)
  40.      */
  41.     private $deletedAt;
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function getLabel(): ?string
  47.     {
  48.         return $this->label;
  49.     }
  50.     public function setLabel(string $label): self
  51.     {
  52.         $this->label $label;
  53.         return $this;
  54.     }
  55.     public function getDescription(): ?string
  56.     {
  57.         return $this->description;
  58.     }
  59.     public function setDescription(?string $description): self
  60.     {
  61.         $this->description $description;
  62.         return $this;
  63.     }
  64.     public function getPlaceholderCommentary(): ?string
  65.     {
  66.         return $this->placeholderCommentary;
  67.     }
  68.     public function setPlaceholderCommentary(?string $placeholderCommentary): self
  69.     {
  70.         $this->placeholderCommentary $placeholderCommentary;
  71.         return $this;
  72.     }
  73.     public function getEntitiesToRefresh(): array
  74.     {
  75.         $entitiesToRefresh = [];
  76.         $entitiesToRefresh[] = $this;
  77.         return $entitiesToRefresh;
  78.     }
  79.     public function getDeletedAt(): ?\DateTimeInterface
  80.     {
  81.         return $this->deletedAt;
  82.     }
  83.     public function setDeletedAt(?\DateTimeInterface $deletedAt): self
  84.     {
  85.         $this->deletedAt $deletedAt;
  86.         return $this;
  87.     }
  88.     public function isDeleted(): bool
  89.     {
  90.         return $this->deletedAt !== null;
  91.     }
  92. }