ArticleTemplate.php 956 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace Translatable\Fixture\Template;
  3. use Gedmo\Mapping\Annotation as Gedmo;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\MappedSuperclass
  7. */
  8. class ArticleTemplate
  9. {
  10. /**
  11. * @Gedmo\Translatable
  12. * @ORM\Column(name="title", type="string", length=128)
  13. */
  14. private $title;
  15. /**
  16. * @Gedmo\Translatable
  17. * @ORM\Column(name="content", type="text")
  18. */
  19. private $content;
  20. /**
  21. * Used locale to override Translation listener`s locale
  22. * @Gedmo\Locale
  23. */
  24. protected $locale;
  25. public function setTitle($title)
  26. {
  27. $this->title = $title;
  28. }
  29. public function getTitle()
  30. {
  31. return $this->title;
  32. }
  33. public function setContent($content)
  34. {
  35. $this->content = $content;
  36. }
  37. public function getContent()
  38. {
  39. return $this->content;
  40. }
  41. public function setTranslatableLocale($locale)
  42. {
  43. $this->locale = $locale;
  44. }
  45. }