DDC117Translation.php 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. namespace Doctrine\Tests\Models\DDC117;
  3. /**
  4. * @Entity
  5. */
  6. class DDC117Translation
  7. {
  8. /**
  9. * @Id
  10. * @ManyToOne(targetEntity="DDC117Article")
  11. * @JoinColumn(name="article_id", referencedColumnName="article_id")
  12. */
  13. private $article;
  14. /**
  15. * @Id @column(type="string")
  16. */
  17. private $language;
  18. /**
  19. * @column(type="string")
  20. */
  21. private $title;
  22. /**
  23. * @ManyToMany(targetEntity="DDC117Editor", mappedBy="reviewingTranslations")
  24. */
  25. public $reviewedByEditors;
  26. /**
  27. * @OneToMany(targetEntity="DDC117Editor", mappedBy="lastTranslation")
  28. */
  29. public $lastTranslatedBy;
  30. public function __construct($article, $language, $title)
  31. {
  32. $this->article = $article;
  33. $this->language = $language;
  34. $this->title = $title;
  35. $this->reviewedByEditors = new \Doctrine\Common\Collections\ArrayCollection();
  36. $this->lastTranslatedBy = new \Doctrine\Common\Collections\ArrayCollection();
  37. }
  38. public function getArticleId()
  39. {
  40. return $this->article->id();
  41. }
  42. public function getLanguage()
  43. {
  44. return $this->language;
  45. }
  46. public function getLastTranslatedBy()
  47. {
  48. return $this->lastTranslatedBy;
  49. }
  50. public function getReviewedByEditors()
  51. {
  52. return $this->reviewedByEditors;
  53. }
  54. }