src/Entity/Olympiad/StageTranslation.php line 18

  1. <?php
  2. namespace App\Entity\Olympiad;
  3. use App\Entity\Common\DateInterval;
  4. use App\Entity\Traits\ActiveTrait;
  5. use App\Entity\Traits\TrackerFields;
  6. use App\Entity\Traits\UserCreatedInterface;
  7. use App\Entity\Traits\UserUpdatedInterface;
  8. use App\Entity\UUID\HaveUuidInterface;
  9. use App\Entity\UUID\UuidTrait;
  10. use Doctrine\ORM\Mapping as ORM;
  11. use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
  12. use Knp\DoctrineBehaviors\Model\Translatable\TranslationTrait;
  13. #[ORM\Table(name'olympiad_stage_translation')]
  14. #[ORM\Entity]
  15. class StageTranslation implements TranslationInterface
  16. {
  17.     use TranslationTrait {
  18.         isEmpty as ttEmpty;
  19.     }
  20.     public function isEmpty(): bool
  21.     {
  22.         $parentResult $this->ttEmpty();
  23.         if ($parentResult) {
  24.             return true;
  25.         }
  26.         if (empty($this->caption)) {
  27.             return true;
  28.         }
  29. //        if (empty($this->text)) return true;
  30.         return false;
  31.     }
  32.     /**
  33.      * @var int|null
  34.      */
  35.     #[ORM\Id]
  36.     #[ORM\GeneratedValue(strategy'AUTO')]
  37.     #[ORM\Column(type'integer')]
  38.     private $id;
  39.     /**
  40.      * @var string|null
  41.      */
  42.     #[ORM\Column(type'string'nullabletrue)]
  43.     private $caption;
  44.     /**
  45.      * @var string|null
  46.      */
  47.     #[ORM\Column(type'text'nullabletrue)]
  48.     private $description;
  49.     /**
  50.      * @var string|null
  51.      */
  52.     #[ORM\Column(type'text'nullabletrue)]
  53.     private $place;
  54.     /**
  55.      * @var string|null
  56.      */
  57.     #[ORM\Column(type'string'nullabletrue)]
  58.     private ?string $place_short=null;
  59.     /**
  60.      * @var string|null
  61.      */
  62.     #[ORM\Column(type'text'nullabletrue)]
  63.     private $contacts;
  64.     /**
  65.      * @return int|null
  66.      */
  67.     public function getId(): ?int
  68.     {
  69.         return $this->id;
  70.     }
  71.     /**
  72.      * @param int|null $id
  73.      */
  74.     public function setId(?int $id): void
  75.     {
  76.         $this->id $id;
  77.     }
  78.     /**
  79.      * @return string|null
  80.      */
  81.     public function getCaption(): ?string
  82.     {
  83.         return $this->caption;
  84.     }
  85.     /**
  86.      * @param string|null $caption
  87.      */
  88.     public function setCaption(?string $caption): void
  89.     {
  90.         $this->caption $caption;
  91.     }
  92.     /**
  93.      * @return string|null
  94.      */
  95.     public function getDescription(): ?string
  96.     {
  97.         return $this->description;
  98.     }
  99.     /**
  100.      * @param string|null $description
  101.      */
  102.     public function setDescription(?string $description): void
  103.     {
  104.         $this->description $description;
  105.     }
  106.     /**
  107.      * @return string|null
  108.      */
  109.     public function getPlace(): ?string
  110.     {
  111.         return $this->place;
  112.     }
  113.     /**
  114.      * @param string|null $place
  115.      */
  116.     public function setPlace(?string $place): void
  117.     {
  118.         $this->place $place;
  119.     }
  120.     /**
  121.      * @return string|null
  122.      */
  123.     public function getPlaceShort(): ?string
  124.     {
  125.         return $this->place_short;
  126.     }
  127.     /**
  128.      * @param string|null $place_short
  129.      */
  130.     public function setPlaceShort(?string $place_short): void
  131.     {
  132.         $this->place_short $place_short;
  133.     }
  134.     /**
  135.      * @return string|null
  136.      */
  137.     public function getContacts(): ?string
  138.     {
  139.         return $this->contacts;
  140.     }
  141.     /**
  142.      * @param string|null $contacts
  143.      */
  144.     public function setContacts(?string $contacts): void
  145.     {
  146.         $this->contacts $contacts;
  147.     }
  148. }