From 189ef6342a3f9befec379c406821ed10730cacd2 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 16 Mar 2016 20:41:29 +0100 Subject: use integers for archived/starred status --- src/Wallabag/CoreBundle/Entity/Entry.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/Wallabag/CoreBundle') 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; -- cgit v1.2.3