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();
 }
示例#2
0
 public function addArticle(TranslatableArticle $article)
 {
     $article->setPage($this);
     $this->articles[] = $article;
 }