| @@ 108-125 (lines=18) @@ | ||
| 105 | * @param string $view |
|
| 106 | * @return JSONResponse |
|
| 107 | */ |
|
| 108 | private function setView($view) { |
|
| 109 | if (!$this->isViewAllowed($view)) { |
|
| 110 | return new JSONResponse([], Http::STATUS_UNPROCESSABLE_ENTITY); |
|
| 111 | } |
|
| 112 | ||
| 113 | try { |
|
| 114 | $this->config->setUserValue( |
|
| 115 | $this->userId, |
|
| 116 | $this->appName, |
|
| 117 | 'currentView', |
|
| 118 | $view |
|
| 119 | ); |
|
| 120 | } catch(\Exception $e) { |
|
| 121 | return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR); |
|
| 122 | } |
|
| 123 | ||
| 124 | return new JSONResponse(); |
|
| 125 | } |
|
| 126 | ||
| 127 | ||
| 128 | /** |
|
| @@ 172-189 (lines=18) @@ | ||
| 169 | * @param $value |
|
| 170 | * @return JSONResponse |
|
| 171 | */ |
|
| 172 | private function setSkipPopover($value) { |
|
| 173 | if (!$this->isSkipPopoverValueAllowed($value)) { |
|
| 174 | return new JSONResponse([], Http::STATUS_UNPROCESSABLE_ENTITY); |
|
| 175 | } |
|
| 176 | ||
| 177 | try { |
|
| 178 | $this->config->setUserValue( |
|
| 179 | $this->userId, |
|
| 180 | $this->appName, |
|
| 181 | 'skipPopover', |
|
| 182 | $value |
|
| 183 | ); |
|
| 184 | } catch(\Exception $e) { |
|
| 185 | return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR); |
|
| 186 | } |
|
| 187 | ||
| 188 | return new JSONResponse(); |
|
| 189 | } |
|
| 190 | ||
| 191 | /** |
|
| 192 | * get if popover shall be skipped |
|