src/Entity/Application/BannerTranslation.php line 15

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_banner_translation")
  9. * @ORM\Entity(repositoryClass="App\Repository\TranslationRepository")
  10. * @ORM\HasLifecycleCallbacks()
  11. */
  12. class BannerTranslation 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=100)
  29. */
  30. private $title;
  31. /**
  32. * @Serializer\Groups({"api"})
  33. * @Serializer\SerializedName("url")
  34. * @ORM\Column(type="string", length=200, nullable=true)
  35. */
  36. private $url;
  37. public function getName(): ?string
  38. {
  39. return trim($this->name);
  40. }
  41. public function setName(string $name): self
  42. {
  43. $this->name = $name;
  44. return $this;
  45. }
  46. public function getTitle(): ?string
  47. {
  48. return $this->title;
  49. }
  50. public function setTitle(string $title): self
  51. {
  52. $this->title = $title;
  53. return $this;
  54. }
  55. /**
  56. * Get Url
  57. *
  58. * @return mixed
  59. */
  60. public function getUrl()
  61. {
  62. return $this->url;
  63. }
  64. /**
  65. * Set Url
  66. *
  67. * @param mixed $url
  68. */
  69. public function setUrl( $url )
  70. {
  71. $this->url = $url;
  72. }
  73. }