diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-01-23 12:45:24 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-01-23 12:45:24 +0100 |
commit | 163eae0bb15d0daa5390f434a42a8176eca186e7 (patch) | |
tree | 0e1ab2c2bb9591e826e73d875cbb04fdabb3f77f /src/WallabagBundle/Entity/Entries.php | |
parent | bd9f08157cc10619e9bb9dace6df43090dde44a9 (diff) | |
download | wallabag-163eae0bb15d0daa5390f434a42a8176eca186e7.tar.gz wallabag-163eae0bb15d0daa5390f434a42a8176eca186e7.tar.zst wallabag-163eae0bb15d0daa5390f434a42a8176eca186e7.zip |
toggle archive / fav actions
Diffstat (limited to 'src/WallabagBundle/Entity/Entries.php')
-rw-r--r-- | src/WallabagBundle/Entity/Entries.php | 13 |
1 files changed, 13 insertions, 0 deletions
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 | |||
144 | return $this->isRead; | 144 | return $this->isRead; |
145 | } | 145 | } |
146 | 146 | ||
147 | public function toggleArchive() | ||
148 | { | ||
149 | $this->isRead = $this->getIsRead() ^ 1; | ||
150 | return $this; | ||
151 | } | ||
152 | |||
147 | /** | 153 | /** |
148 | * Set isFav | 154 | * Set isFav |
149 | * | 155 | * |
@@ -167,6 +173,13 @@ class Entries | |||
167 | return $this->isFav; | 173 | return $this->isFav; |
168 | } | 174 | } |
169 | 175 | ||
176 | public function toggleStar() | ||
177 | { | ||
178 | $this->isFav = $this->getIsFav() ^ 1; | ||
179 | |||
180 | return $this; | ||
181 | } | ||
182 | |||
170 | /** | 183 | /** |
171 | * Set content | 184 | * Set content |
172 | * | 185 | * |