예제 #1
0
 /**
  * @param Tag $tag
  * @return bool
  */
 public function removeTag(Tag $tag)
 {
     if ($this->hasTag($tag)) {
         return $this->tags->removeElement($tag);
     }
     return false;
 }
예제 #2
0
 /**
  * Remove tags
  * @param Collection|Tag[] $tags
  * @return self
  */
 public function removeTags(Collection $tags)
 {
     foreach ($tags as $tag) {
         $this->tags->removeElement($tag);
     }
     return $this;
 }
예제 #3
0
 /**
  * @param Article $article
  * @return bool
  */
 public function removeArticle(Article $article)
 {
     if ($this->hasArticle($article)) {
         return $this->articles->removeElement($article);
     }
     return false;
 }
예제 #4
0
파일: News.php 프로젝트: kbedn/admin-bundle
 /**
  * @param Tag $tag
  */
 public function removeTag(Tag $tag)
 {
     $tag->setNews(null);
     $this->tags->removeElement($tag);
 }
 /**
  * @param Tag $tag
  */
 public function removeTag(Tag $tag)
 {
     $this->tags->removeElement($tag);
 }