| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 22 | public function handle(Request $request) |
||
| 23 | { |
||
| 24 | $routeParameters = $request->get('_route_params'); |
||
| 25 | |||
| 26 | if (!$routeParameters) { |
||
| 27 | throw new Exception('Cannot find admin from request. _route_params parameters for request not found'); |
||
| 28 | } |
||
| 29 | if (!array_key_exists('_admin', $routeParameters)) { |
||
| 30 | throw new Exception('Cannot find admin from request. "_admin" route parameter is missing'); |
||
| 31 | } |
||
| 32 | if (!array_key_exists('_action', $routeParameters)) { |
||
| 33 | throw new Exception('Cannot find admin action from request. "_action" route parameter is missing'); |
||
| 34 | } |
||
| 35 | |||
| 36 | return $this |
||
| 37 | ->registry |
||
| 38 | ->get($routeParameters['_admin']); |
||
| 39 | } |
||
| 40 | } |
||
| 41 |