Article.php 927 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace Translatable\Fixture\Issue114;
  3. use Gedmo\Mapping\Annotation as Gedmo;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity
  7. */
  8. class Article
  9. {
  10. /**
  11. * @ORM\Id
  12. * @ORM\GeneratedValue
  13. * @ORM\Column(type="integer")
  14. */
  15. private $id;
  16. /**
  17. * @Gedmo\Translatable
  18. * @ORM\Column(name="title", type="string", length=128)
  19. */
  20. private $title;
  21. /**
  22. * @ORM\ManyToOne(targetEntity="Category", inversedBy="articles")
  23. */
  24. private $category;
  25. public function getId()
  26. {
  27. return $this->id;
  28. }
  29. public function setTitle($title)
  30. {
  31. $this->title = $title;
  32. }
  33. public function getTitle()
  34. {
  35. return $this->title;
  36. }
  37. public function setCategory(Category $category)
  38. {
  39. $this->category = $category;
  40. }
  41. public function getCategory()
  42. {
  43. return $this->category;
  44. }
  45. }