aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Entity/Entry.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity/Entry.php')
-rw-r--r--src/Wallabag/CoreBundle/Entity/Entry.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php
index 581e8906..cba72d31 100644
--- a/src/Wallabag/CoreBundle/Entity/Entry.php
+++ b/src/Wallabag/CoreBundle/Entity/Entry.php
@@ -593,6 +593,11 @@ class Entry
593 $tag->addEntry($this); 593 $tag->addEntry($this);
594 } 594 }
595 595
596 /**
597 * Remove the given tag from the entry (if the tag is associated).
598 *
599 * @param Tag $tag
600 */
596 public function removeTag(Tag $tag) 601 public function removeTag(Tag $tag)
597 { 602 {
598 if (!$this->tags->contains($tag)) { 603 if (!$this->tags->contains($tag)) {
@@ -604,6 +609,17 @@ class Entry
604 } 609 }
605 610
606 /** 611 /**
612 * Remove all assigned tags from the entry.
613 */
614 public function removeAllTags()
615 {
616 foreach ($this->tags as $tag) {
617 $this->tags->removeElement($tag);
618 $tag->removeEntry($this);
619 }
620 }
621
622 /**
607 * Set previewPicture. 623 * Set previewPicture.
608 * 624 *
609 * @param string $previewPicture 625 * @param string $previewPicture