]> 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 9a7dd4e7b77e43613e7a1048a847fda7afb724d4..a0503c3918170dfbb9fc8bb29a0e8a4f22f72f4c 100644 (file)
@@ -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
      */