]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Entity/Entry.php
Change documentation links to HTTPS
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Entity / Entry.php
index 304258a9c28854977988247fd229d9b676d8de9e..f2da3f4def670d5a0e08af123a1617a2cb3fa509 100644 (file)
@@ -97,7 +97,7 @@ class Entry
     private $content;
 
     /**
-     * @var date
+     * @var \DateTime
      *
      * @ORM\Column(name="created_at", type="datetime")
      *
@@ -106,7 +106,7 @@ class Entry
     private $createdAt;
 
     /**
-     * @var date
+     * @var \DateTime
      *
      * @ORM\Column(name="updated_at", type="datetime")
      *
@@ -196,8 +196,6 @@ class Entry
      *      @ORM\JoinColumn(name="tag_id", referencedColumnName="id")
      *  }
      * )
-     *
-     * @Groups({"entries_for_user", "export_all"})
      */
     private $tags;
 
@@ -413,7 +411,7 @@ class Entry
      * Set created_at.
      * Only used when importing data from an other service.
      *
-     * @param DateTime $createdAt
+     * @param \DateTime $createdAt
      *
      * @return Entry
      */
@@ -425,7 +423,7 @@ class Entry
     }
 
     /**
-     * @return DateTime
+     * @return \DateTime
      */
     public function getCreatedAt()
     {
@@ -433,7 +431,7 @@ class Entry
     }
 
     /**
-     * @return DateTime
+     * @return \DateTime
      */
     public function getUpdatedAt()
     {
@@ -541,6 +539,21 @@ class Entry
         return $this->tags;
     }
 
+    /**
+     * @VirtualProperty
+     * @SerializedName("tags")
+     * @Groups({"entries_for_user", "export_all"})
+     */
+    public function getSerializedTags()
+    {
+        $data = [];
+        foreach ($this->tags as $tag) {
+            $data[] = $tag->getLabel();
+        }
+
+        return $data;
+    }
+
     /**
      * @param Tag $tag
      */