]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/WallabagBundle/Entity/Entries.php
toggle archive / fav actions
[github/wallabag/wallabag.git] / src / WallabagBundle / Entity / Entries.php
index 69c6be0d75105c91aeed43686c7cb0e0123af6b3..b364e0c334258c0531b97493f6f31d6965df79a7 100644 (file)
@@ -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
      *