示例#1
0
文件: Feed.php 项目: ffff5912/antena
 public function addArticle(Article $article)
 {
     if (!$this->articles->contains($article)) {
         $article->setFeed($this);
         $this->articles->add($article);
     }
 }
示例#2
0
 /**
  * @param Article $article
  * @return Tag
  */
 public function addArticle(Article $article)
 {
     if (!$this->articles->contains($article)) {
         $this->articles->add($article);
     }
     return $this;
 }
示例#3
0
文件: Issue.php 项目: ulakjira/ojs
 /**
  * Remove article
  *
  * @param Article $article
  * @return Issue
  */
 public function removeArticle(Article $article)
 {
     if ($this->articles->contains($article)) {
         $this->articles->removeElement($article);
         $article->setIssue(null);
     }
 }
示例#4
0
 /**
  * Check if an article exists in the page
  *
  * @param Article $article
  *
  * @return bool
  */
 public function hasArticle(Article $article = null)
 {
     return $this->articles->contains($article);
 }