Total Complexity | 4 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
25 | final class LayoutDataProvider implements ItemDataProviderInterface, RestrictedDataProviderInterface |
||
26 | { |
||
27 | private LayoutRepository $repository; |
||
28 | |||
29 | 3 | public function __construct(LayoutRepository $repository) |
|
32 | 3 | } |
|
33 | |||
34 | 1 | public function supports(string $resourceClass, string $operationName = null, array $context = []): bool |
|
35 | { |
||
36 | 1 | return Layout::class === $resourceClass; |
|
37 | } |
||
38 | |||
39 | /** @throws ResourceClassNotSupportedException */ |
||
40 | 2 | public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []): ?Layout |
|
47 | } |
||
48 | } |
||
49 |