| @@ 239-247 (lines=9) @@ | ||
| 236 | 'permission' => $data['permission'] ?? null |
|
| 237 | ]; |
|
| 238 | ||
| 239 | } else if ($this->requestType === 'api') { |
|
| 240 | ||
| 241 | return [ |
|
| 242 | 'class' => $data['controller'], |
|
| 243 | 'action' => $this->getRestfulAction(), |
|
| 244 | 'permission' => $data['permission'] ?? null |
|
| 245 | ]; |
|
| 246 | ||
| 247 | } |
|
| 248 | ||
| 249 | throw new MethodNotFoundException('Non valid request method available.'); |
|
| 250 | ||
| @@ 287-296 (lines=10) @@ | ||
| 284 | 'var' => $var |
|
| 285 | ]; |
|
| 286 | ||
| 287 | } else if ($this->requestType === 'api') { |
|
| 288 | ||
| 289 | return [ |
|
| 290 | 'class' => $data['controller'], |
|
| 291 | 'action' => $this->getRestfulAction(), |
|
| 292 | 'permission' => $data['permission'] ?? null, |
|
| 293 | 'var' => $var |
|
| 294 | ]; |
|
| 295 | ||
| 296 | } |
|
| 297 | ||
| 298 | } |
|
| 299 | ||