private function populate() { $article = new TranslatableArticle(); $article->setTitle('the title'); $article->setCode('my code'); $this->em->persist($article); $this->em->flush(); $this->em->clear(); $this->articleId = $article->getId(); }
public function addArticle(TranslatableArticle $article) { $article->setPage($this); $this->articles[] = $article; }