]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Entity/Entry.php
Few fixes
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Entity / Entry.php
index 29ca9febc85b71e89b5e0f8e62a0c9d28c2711d4..a0503c3918170dfbb9fc8bb29a0e8a4f22f72f4c 100644 (file)
@@ -550,7 +550,7 @@ class Entry
     }
 
     /**
-     * @return array<Tag>
+     * @return ArrayCollection
      */
     public function getTags()
     {
@@ -684,6 +684,21 @@ class Entry
         $this->uid = null;
     }
 
+    /**
+     * Used in the entries filter so it's more explicit for the end user than the uid.
+     * Also used in the API.
+     *
+     * @VirtualProperty
+     * @SerializedName("is_public")
+     * @Groups({"entries_for_user"})
+     *
+     * @return bool
+     */
+    public function isPublic()
+    {
+        return null !== $this->uid;
+    }
+
     /**
      * @return string
      */