X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FEntity%2FEntry.php;h=8f4ddf613212d96fc640589f95646fce805ec87b;hb=189ef6342a3f9befec379c406821ed10730cacd2;hp=5e608f05d909a57d99ab0b8a4977721d510e5ae9;hpb=0d3043a29c4aba541d6a18c2d5cc7ebffc6ddc78;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 5e608f05..8f4ddf61 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -59,6 +59,8 @@ class Entry /** * @var bool * + * @Exclude + * * @ORM\Column(name="is_archived", type="boolean") * * @Groups({"entries_for_user", "export_all"}) @@ -68,6 +70,8 @@ class Entry /** * @var bool * + * @Exclude + * * @ORM\Column(name="is_starred", type="boolean") * * @Groups({"entries_for_user", "export_all"}) @@ -271,6 +275,16 @@ class Entry return $this->isArchived; } + /** + * @VirtualProperty + * @SerializedName("is_archived") + * @Groups({"entries_for_user", "export_all"}) + */ + public function is_Archived() + { + return (int) $this->isArchived(); + } + public function toggleArchive() { $this->isArchived = $this->isArchived() ^ 1; @@ -302,6 +316,16 @@ class Entry return $this->isStarred; } + /** + * @VirtualProperty + * @SerializedName("is_starred") + * @Groups({"entries_for_user", "export_all"}) + */ + public function is_Starred() + { + return (int) $this->isStarred(); + } + public function toggleStar() { $this->isStarred = $this->isStarred() ^ 1;