예제 #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
파일: Section.php 프로젝트: hasantayyar/ojs
 /**
  * Remove articles
  *
  * @param Article $article
  */
 public function removeArticle(Article $article)
 {
     $this->articles->removeElement($article);
 }
예제 #3
0
파일: Journal.php 프로젝트: beyzakokcan/ojs
 /**
  * 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;
 }
예제 #4
0
파일: Category.php 프로젝트: gbelmm/ACL
 public function getSubResources(EntityManager $entityManager)
 {
     return array_merge($this->children->toArray(), $this->articles->toArray());
 }
예제 #5
0
파일: Issue.php 프로젝트: ulakjira/ojs
 /**
  * Remove section from issue
  *
  * @param Section $section
  */
 public function removeSection(Section $section)
 {
     $this->articles->removeElement($section);
 }
예제 #6
0
파일: Issue.php 프로젝트: ojs/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);
     }
 }
예제 #7
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);
 }