Total Complexity | 3 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | class RouteDataProvider implements ItemDataProviderInterface, RestrictedDataProviderInterface |
||
11 | { |
||
12 | private $routeRepository; |
||
13 | |||
14 | public function __construct(RouteRepository $routeRepository) |
||
15 | { |
||
16 | $this->routeRepository = $routeRepository; |
||
17 | } |
||
18 | |||
19 | public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []) |
||
20 | { |
||
21 | return $this->routeRepository->findOneByIdOrRoute($id); |
||
22 | } |
||
23 | |||
24 | public function supports(string $resourceClass, string $operationName = null, array $context = []): bool |
||
27 | } |
||
28 | } |
||
29 |