| Total Complexity | 4 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 66.67% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | final class LayoutDataProvider implements ItemDataProviderInterface, RestrictedDataProviderInterface |
||
| 12 | { |
||
| 13 | private $repository; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * LayoutDataProvider constructor. |
||
| 17 | * |
||
| 18 | * @param LayoutRepository $repository |
||
| 19 | */ |
||
| 20 | 1 | public function __construct(LayoutRepository $repository) |
|
| 21 | { |
||
| 22 | 1 | $this->repository = $repository; |
|
| 23 | 1 | } |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @param string $resourceClass |
||
| 27 | * @param string|null $operationName |
||
| 28 | * @param array $context |
||
| 29 | * @return bool |
||
| 30 | */ |
||
| 31 | public function supports(string $resourceClass, string $operationName = null, array $context = []): bool |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $resourceClass |
||
| 38 | * @param int|string $id |
||
| 39 | * @param string|null $operationName |
||
| 40 | * @param array $context |
||
| 41 | * @return Layout|null |
||
| 42 | * @throws ResourceClassNotSupportedException |
||
| 43 | */ |
||
| 44 | 1 | public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []): ?Layout |
|
| 50 | } |
||
| 51 | } |
||
| 52 |