Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public function load($resource, string $type = null): RouteCollection |
||
24 | { |
||
25 | if ($this->loaded) { |
||
26 | throw new RuntimeException('Do not add the Admin routing loader "extra" twice'); |
||
27 | } |
||
28 | $routes = new RouteCollection(); |
||
29 | $resources = $this->resourceRegistry->all(); |
||
30 | |||
31 | foreach ($resources as $resource) { |
||
|
|||
32 | $this->resourceLoader->loadRoutes($resource, $routes); |
||
33 | } |
||
34 | |||
35 | return $routes; |
||
36 | } |
||
43 |