1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Merge pull request #3256 from wallabag/fix-patch

Fix PATCH method
This commit is contained in:
Jérémy Benoist 2017-07-05 15:00:24 +02:00 committed by GitHub
commit b5d7eb148c
5 changed files with 366 additions and 186 deletions

View file

@ -593,6 +593,11 @@ class Entry
$tag->addEntry($this);
}
/**
* Remove the given tag from the entry (if the tag is associated).
*
* @param Tag $tag
*/
public function removeTag(Tag $tag)
{
if (!$this->tags->contains($tag)) {
@ -603,6 +608,17 @@ class Entry
$tag->removeEntry($this);
}
/**
* Remove all assigned tags from the entry.
*/
public function removeAllTags()
{
foreach ($this->tags as $tag) {
$this->tags->removeElement($tag);
$tag->removeEntry($this);
}
}
/**
* Set previewPicture.
*