src/Entity/Application/OfferTranslation.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Application;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Entity\Behaviors\TranslationTrait;
  5. use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
  6. use JMS\Serializer\Annotation as Serializer;
  7. /**
  8. * @ORM\Table(name="app_offer_translation")
  9. * @ORM\Entity(repositoryClass="App\Repository\TranslationRepository")
  10. * @ORM\HasLifecycleCallbacks()
  11. */
  12. class OfferTranslation implements TranslationInterface
  13. {
  14. use TranslationTrait;
  15. /**
  16. * @ORM\Column(type="string", length=2)
  17. */
  18. protected $locale;
  19. /**
  20. * @Serializer\Groups({"api"})
  21. * @Serializer\SerializedName("name")
  22. * @ORM\Column(type="string", length=150)
  23. */
  24. private $name;
  25. /**
  26. * @Serializer\Groups({"api"})
  27. * @Serializer\SerializedName("title")
  28. * @ORM\Column(type="string", length=255, nullable=true)
  29. */
  30. private $title;
  31. /**
  32. * @Serializer\Groups({"api"})
  33. * @Serializer\SerializedName("subtitle")
  34. * @ORM\Column(type="string", length=255, nullable=true)
  35. */
  36. private $subTitle;
  37. /**
  38. * @ORM\Column(type="text", nullable=true)
  39. */
  40. private $description;
  41. public function getName(): ?string
  42. {
  43. return trim($this->name);
  44. }
  45. public function setName(string $name): self
  46. {
  47. $this->name = $name;
  48. return $this;
  49. }
  50. public function getTitle(): ?string
  51. {
  52. return $this->title;
  53. }
  54. public function setTitle(?string $title): self
  55. {
  56. $this->title = $title;
  57. return $this;
  58. }
  59. public function getSubTitle(): ?string
  60. {
  61. return $this->subTitle;
  62. }
  63. public function setSubTitle(?string $subTitle): self
  64. {
  65. $this->subTitle = $subTitle;
  66. return $this;
  67. }
  68. /**
  69. * @return mixed
  70. */
  71. public function getDescription()
  72. {
  73. return $this->description;
  74. }
  75. /**
  76. * @param mixed $description
  77. */
  78. public function setDescription($description): void
  79. {
  80. $this->description = $description;
  81. }
  82. }