src/Entity/Olympiad/Online/CategoryTranslation.php line 11

  1. <?php
  2. namespace App\Entity\Olympiad\Online;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
  5. use Knp\DoctrineBehaviors\Model\Translatable\TranslationTrait;
  6. #[ORM\Table(name'olymp_online_category_translation')]
  7. #[ORM\Entity]
  8. class CategoryTranslation implements TranslationInterface
  9. {
  10.     use TranslationTrait {
  11.         isEmpty as ttEmpty;
  12.     }
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue(strategy'AUTO')]
  15.     #[ORM\Column(type'integer')]
  16.     private ?int $id null;
  17.     #[ORM\Column(type'string'nullabletrue)]
  18.     private ?string $caption null;
  19.     /**
  20.      * @var string|null
  21.      */
  22.     #[ORM\Column(type'string'nullabletrue)]
  23.     private ?string $apply_button null;
  24.     /**
  25.      * @var string|null
  26.      */
  27.     #[ORM\Column(type'text'nullabletrue)]
  28.     private ?string $apply_description null;
  29.     public function isEmpty(): bool
  30.     {
  31.         $parentResult $this->ttEmpty();
  32.         if ($parentResult) {
  33.             return true;
  34.         }
  35.         if (empty($this->caption)) {
  36.             return true;
  37.         }
  38.         return false;
  39.     }
  40.     /**
  41.      * @return int|null
  42.      */
  43.     public function getId(): ?int
  44.     {
  45.         return $this->id;
  46.     }
  47.     /**
  48.      * @param int|null $id
  49.      */
  50.     public function setId(?int $id): void
  51.     {
  52.         $this->id $id;
  53.     }
  54.     /**
  55.      * @return string|null
  56.      */
  57.     public function getApplyButton(): ?string
  58.     {
  59.         return $this->apply_button;
  60.     }
  61.     /**
  62.      * @param string|null $apply_button
  63.      */
  64.     public function setApplyButton(?string $apply_button): void
  65.     {
  66.         $this->apply_button $apply_button;
  67.     }
  68.     /**
  69.      * @return string|null
  70.      */
  71.     public function getCaption(): ?string
  72.     {
  73.         return $this->caption;
  74.     }
  75.     /**
  76.      * @param string|null $caption
  77.      */
  78.     public function setCaption(?string $caption): void
  79.     {
  80.         $this->caption $caption;
  81.     }
  82.     /**
  83.      * @return string|null
  84.      */
  85.     public function getApplyDescription(): ?string
  86.     {
  87.         return $this->apply_description;
  88.     }
  89.     /**
  90.      * @param string|null $apply_description
  91.      */
  92.     public function setApplyDescription(?string $apply_description): void
  93.     {
  94.         $this->apply_description $apply_description;
  95.     }
  96. }