3 namespace Doctrine\Tests\Models\DDC117;
10 /** @Id @Column(type="integer", name="article_id") @GeneratedValue */
17 * @OneToMany(targetEntity="DDC117Reference", mappedBy="source", cascade={"remove"})
22 * @OneToOne(targetEntity="DDC117ArticleDetails", mappedBy="article", cascade={"persist", "remove"})
27 * @OneToMany(targetEntity="DDC117Translation", mappedBy="article", cascade={"persist", "remove"})
29 private $translations;
32 * @OneToMany(targetEntity="DDC117Link", mappedBy="source")
36 public function __construct($title)
38 $this->title = $title;
39 $this->references = new \Doctrine\Common\Collections\ArrayCollection();
40 $this->translations = new \Doctrine\Common\Collections\ArrayCollection();
43 public function setDetails($details)
45 $this->details = $details;
53 public function addReference($reference)
55 $this->references[] = $reference;
58 public function references()
60 return $this->references;
63 public function addTranslation($language, $title)
65 $this->translations[] = new DDC117Translation($this, $language, $title);
68 public function getText()
70 return $this->details->getText();
73 public function getDetails()
75 return $this->details;
78 public function resetText()
80 $this->details = null;
83 public function getTranslations()
85 return $this->translations;