| @@ 137-152 (lines=16) @@ | ||
| 134 | * |
|
| 135 | * @return JSONResponse |
|
| 136 | */ |
|
| 137 | private function getView() { |
|
| 138 | try { |
|
| 139 | $view = $this->config->getUserValue( |
|
| 140 | $this->userId, |
|
| 141 | $this->appName, |
|
| 142 | 'currentView', |
|
| 143 | 'month' |
|
| 144 | ); |
|
| 145 | } catch(\Exception $e) { |
|
| 146 | return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR); |
|
| 147 | } |
|
| 148 | ||
| 149 | return new JSONResponse([ |
|
| 150 | 'value' => $view, |
|
| 151 | ]); |
|
| 152 | } |
|
| 153 | ||
| 154 | /** |
|
| 155 | * check if view is allowed |
|
| @@ 200-215 (lines=16) @@ | ||
| 197 | * |
|
| 198 | * @return JSONResponse |
|
| 199 | */ |
|
| 200 | private function getSkipPopover() { |
|
| 201 | try { |
|
| 202 | $view = $this->config->getUserValue( |
|
| 203 | $this->userId, |
|
| 204 | $this->appName, |
|
| 205 | 'skipPopover', |
|
| 206 | 'no' |
|
| 207 | ); |
|
| 208 | } catch(\Exception $e) { |
|
| 209 | return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR); |
|
| 210 | } |
|
| 211 | ||
| 212 | return new JSONResponse([ |
|
| 213 | 'value' => $view, |
|
| 214 | ]); |
|
| 215 | } |
|
| 216 | ||
| 217 | /** |
|
| 218 | * check if value for skipPopover is allowed |
|
| @@ 262-277 (lines=16) @@ | ||
| 259 | * |
|
| 260 | * @return JSONResponse |
|
| 261 | */ |
|
| 262 | private function getShowWeekNr() { |
|
| 263 | try { |
|
| 264 | $value = $this->config->getUserValue( |
|
| 265 | $this->userId, |
|
| 266 | $this->appName, |
|
| 267 | 'showWeekNr', |
|
| 268 | 'no' |
|
| 269 | ); |
|
| 270 | } catch(\Exception $e) { |
|
| 271 | return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR); |
|
| 272 | } |
|
| 273 | ||
| 274 | return new JSONResponse([ |
|
| 275 | 'value' => $value, |
|
| 276 | ]); |
|
| 277 | } |
|
| 278 | ||
| 279 | /** |
|
| 280 | * check if value for showWeekNr is allowed |
|