aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Entity/Entry.php
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2016-10-07 13:55:55 +0200
committerGitHub <noreply@github.com>2016-10-07 13:55:55 +0200
commitbf71a734f64a911549e188a5c69ac8e08eec896e (patch)
tree0e40afc2a85658705fdf4a1a6b8e7c6c3d7dfbc3 /src/Wallabag/CoreBundle/Entity/Entry.php
parent9d127b3b9365c73bc393bc303545f24c159cee31 (diff)
parent74e1f7433a5fc0a9bbf3942a22917e0dd1cc6923 (diff)
downloadwallabag-bf71a734f64a911549e188a5c69ac8e08eec896e.tar.gz
wallabag-bf71a734f64a911549e188a5c69ac8e08eec896e.tar.zst
wallabag-bf71a734f64a911549e188a5c69ac8e08eec896e.zip
Merge pull request #2332 from wallabag/tags-export
Fix relations export for Entry
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity/Entry.php')
-rw-r--r--src/Wallabag/CoreBundle/Entity/Entry.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php
index a4b0d7a8..f2da3f4d 100644
--- a/src/Wallabag/CoreBundle/Entity/Entry.php
+++ b/src/Wallabag/CoreBundle/Entity/Entry.php
@@ -196,8 +196,6 @@ class Entry
196 * @ORM\JoinColumn(name="tag_id", referencedColumnName="id") 196 * @ORM\JoinColumn(name="tag_id", referencedColumnName="id")
197 * } 197 * }
198 * ) 198 * )
199 *
200 * @Groups({"entries_for_user", "export_all"})
201 */ 199 */
202 private $tags; 200 private $tags;
203 201
@@ -542,6 +540,21 @@ class Entry
542 } 540 }
543 541
544 /** 542 /**
543 * @VirtualProperty
544 * @SerializedName("tags")
545 * @Groups({"entries_for_user", "export_all"})
546 */
547 public function getSerializedTags()
548 {
549 $data = [];
550 foreach ($this->tags as $tag) {
551 $data[] = $tag->getLabel();
552 }
553
554 return $data;
555 }
556
557 /**
545 * @param Tag $tag 558 * @param Tag $tag
546 */ 559 */
547 public function addTag(Tag $tag) 560 public function addTag(Tag $tag)