From 163eae0bb15d0daa5390f434a42a8176eca186e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 23 Jan 2015 12:45:24 +0100 Subject: toggle archive / fav actions --- src/WallabagBundle/Entity/Entries.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/WallabagBundle/Entity/Entries.php') diff --git a/src/WallabagBundle/Entity/Entries.php b/src/WallabagBundle/Entity/Entries.php index 69c6be0d..b364e0c3 100644 --- a/src/WallabagBundle/Entity/Entries.php +++ b/src/WallabagBundle/Entity/Entries.php @@ -144,6 +144,12 @@ class Entries return $this->isRead; } + public function toggleArchive() + { + $this->isRead = $this->getIsRead() ^ 1; + return $this; + } + /** * Set isFav * @@ -167,6 +173,13 @@ class Entries return $this->isFav; } + public function toggleStar() + { + $this->isFav = $this->getIsFav() ^ 1; + + return $this; + } + /** * Set content * -- cgit v1.2.3