Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

103 lines
1.9KB

  1. <?php
  2. namespace App\Entity\Site;
  3. use App\Repository\Site\BlockRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
  6. use Knp\DoctrineBehaviors\Model\Translatable\TranslationTrait;
  7. use Lc\SovBundle\Model\File\FileInterface;
  8. /**
  9. * @ORM\Entity(repositoryClass=BlockRepository::class)
  10. */
  11. class BlockTranslation implements TranslationInterface
  12. {
  13. use TranslationTrait;
  14. /**
  15. * @ORM\Id
  16. * @ORM\GeneratedValue
  17. * @ORM\Column(type="integer")
  18. */
  19. private $id;
  20. /**
  21. * @ORM\Column(type="text", nullable=true)
  22. */
  23. private $title;
  24. /**
  25. * @ORM\Column(type="text", nullable=true)
  26. */
  27. private $subtitle;
  28. /**
  29. * @ORM\Column(type="text", nullable=true)
  30. */
  31. private $description;
  32. /**
  33. * @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\File\FileInterface", cascade={"persist", "remove"})
  34. */
  35. private $image;
  36. public function __toString()
  37. {
  38. return $this->title;
  39. }
  40. public function getId(): ?int
  41. {
  42. return $this->id;
  43. }
  44. public function getTitle(): ?string
  45. {
  46. return $this->title;
  47. }
  48. public function setTitle(?string $title): self
  49. {
  50. $this->title = $title;
  51. return $this;
  52. }
  53. public function getSubtitle(): ?string
  54. {
  55. return $this->subtitle;
  56. }
  57. public function setSubtitle(?string $subtitle): self
  58. {
  59. $this->subtitle = $subtitle;
  60. return $this;
  61. }
  62. public function getDescription(): ?string
  63. {
  64. return $this->description;
  65. }
  66. public function setDescription(?string $description): self
  67. {
  68. $this->description = $description;
  69. return $this;
  70. }
  71. public function getImage(): ?FileInterface
  72. {
  73. return $this->image;
  74. }
  75. public function setImage(?FileInterface $image): self
  76. {
  77. $this->image = $image;
  78. return $this;
  79. }
  80. }