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.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)