diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-03-16 23:23:42 +0100 |
---|---|---|
committer | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-03-16 23:23:42 +0100 |
commit | 1978d0e3b63286bbf329b967bf1e6b2e3abef1b4 (patch) | |
tree | 60297ba36d01f9ae25dad3febf3f7d54000d52cf /src/Wallabag/CoreBundle/Entity/Entry.php | |
parent | 3500d4099f88f7db22eba42fdb7e8926f1f1cdac (diff) | |
parent | bc2b947cd54e49a03c267f3c0f13dc5b8a04d962 (diff) | |
download | wallabag-1978d0e3b63286bbf329b967bf1e6b2e3abef1b4.tar.gz wallabag-1978d0e3b63286bbf329b967bf1e6b2e3abef1b4.tar.zst wallabag-1978d0e3b63286bbf329b967bf1e6b2e3abef1b4.zip |
Merge pull request #1791 from wallabag/v2-fix-api-entry-properties
fix api properties and typo
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity/Entry.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/Entry.php | 24 |
1 files changed, 24 insertions, 0 deletions
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 | |||
59 | /** | 59 | /** |
60 | * @var bool | 60 | * @var bool |
61 | * | 61 | * |
62 | * @Exclude | ||
63 | * | ||
62 | * @ORM\Column(name="is_archived", type="boolean") | 64 | * @ORM\Column(name="is_archived", type="boolean") |
63 | * | 65 | * |
64 | * @Groups({"entries_for_user", "export_all"}) | 66 | * @Groups({"entries_for_user", "export_all"}) |
@@ -68,6 +70,8 @@ class Entry | |||
68 | /** | 70 | /** |
69 | * @var bool | 71 | * @var bool |
70 | * | 72 | * |
73 | * @Exclude | ||
74 | * | ||
71 | * @ORM\Column(name="is_starred", type="boolean") | 75 | * @ORM\Column(name="is_starred", type="boolean") |
72 | * | 76 | * |
73 | * @Groups({"entries_for_user", "export_all"}) | 77 | * @Groups({"entries_for_user", "export_all"}) |
@@ -271,6 +275,16 @@ class Entry | |||
271 | return $this->isArchived; | 275 | return $this->isArchived; |
272 | } | 276 | } |
273 | 277 | ||
278 | /** | ||
279 | * @VirtualProperty | ||
280 | * @SerializedName("is_archived") | ||
281 | * @Groups({"entries_for_user", "export_all"}) | ||
282 | */ | ||
283 | public function is_Archived() | ||
284 | { | ||
285 | return (int) $this->isArchived(); | ||
286 | } | ||
287 | |||
274 | public function toggleArchive() | 288 | public function toggleArchive() |
275 | { | 289 | { |
276 | $this->isArchived = $this->isArchived() ^ 1; | 290 | $this->isArchived = $this->isArchived() ^ 1; |
@@ -302,6 +316,16 @@ class Entry | |||
302 | return $this->isStarred; | 316 | return $this->isStarred; |
303 | } | 317 | } |
304 | 318 | ||
319 | /** | ||
320 | * @VirtualProperty | ||
321 | * @SerializedName("is_starred") | ||
322 | * @Groups({"entries_for_user", "export_all"}) | ||
323 | */ | ||
324 | public function is_Starred() | ||
325 | { | ||
326 | return (int) $this->isStarred(); | ||
327 | } | ||
328 | |||
305 | public function toggleStar() | 329 | public function toggleStar() |
306 | { | 330 | { |
307 | $this->isStarred = $this->isStarred() ^ 1; | 331 | $this->isStarred = $this->isStarred() ^ 1; |