public function addArticle(Article $article) { if (!$this->articles->contains($article)) { $article->setFeed($this); $this->articles->add($article); } }
/** * Remove articles * * @param Article $article */ public function removeArticle(Article $article) { $this->articles->removeElement($article); }
/** * Add articles * * @param Article $article * @return Journal */ public function addArticle(Article $article) { if (!$this->articles->contains($article)) { $this->articles->add($article); $article->setJournal($this); } return $this; }
public function getSubResources(EntityManager $entityManager) { return array_merge($this->children->toArray(), $this->articles->toArray()); }
/** * Remove section from issue * * @param Section $section */ public function removeSection(Section $section) { $this->articles->removeElement($section); }
/** * Remove article * * @param Article $article * @return Issue */ public function removeArticle(Article $article) { if ($this->articles->contains($article)) { $this->articles->removeElement($article); $article->setIssue(null); } }
/** * Check if an article exists in the page * * @param Article $article * * @return bool */ public function hasArticle(Article $article = null) { return $this->articles->contains($article); }