Image.php 899 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace Translatable\Fixture\Issue75;
  3. use Gedmo\Mapping\Annotation as Gedmo;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity
  7. */
  8. class Image
  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\ManyToMany(targetEntity="Article", mappedBy="images")
  23. */
  24. private $articles;
  25. public function getId()
  26. {
  27. return $this->id;
  28. }
  29. public function addArticle(Article $article)
  30. {
  31. $this->articles[] = $article;
  32. }
  33. public function getArticles()
  34. {
  35. return $this->articles;
  36. }
  37. public function setTitle($title)
  38. {
  39. $this->title = $title;
  40. }
  41. public function getTitle()
  42. {
  43. return $this->title;
  44. }
  45. }