]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Entity/Entry.php
Add public filter/field in the API
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Entity / Entry.php
index 08a67c34b1f00275b1f61b3cf5bed3b734800560..07d41ed8f8c65748586041eeb3118d26a6294605 100644 (file)
@@ -550,7 +550,7 @@ class Entry
     }
 
     /**
-     * @return ArrayCollection<Tag>
+     * @return ArrayCollection
      */
     public function getTags()
     {
@@ -685,7 +685,21 @@ class Entry
     }
 
     /**
-     * @return int
+     * Used in the entries filter so it's more explicit for the end user than the uid.
+     *
+     * @VirtualProperty
+     * @SerializedName("is_public")
+     * @Groups({"entries_for_user"})
+     *
+     * @return bool
+     */
+    public function isPublic()
+    {
+        return null !== $this->uid;
+    }
+
+    /**
+     * @return string
      */
     public function getHttpStatus()
     {
@@ -693,7 +707,7 @@ class Entry
     }
 
     /**
-     * @param int $httpStatus
+     * @param string $httpStatus
      *
      * @return Entry
      */