Total Complexity | 4 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | final class PageDataTransformer extends AbstractDataTransformer |
||
9 | { |
||
10 | /** |
||
11 | * @param StaticPage $object |
||
12 | */ |
||
13 | public function transform($object, array $context = []): StaticPage |
||
14 | { |
||
15 | /** @var LayoutRepository $repository */ |
||
16 | $repository = $this->container->get(LayoutRepository::class); |
||
17 | $object->setLayout($repository->findOneBy(['default' => true])); |
||
18 | return $object; |
||
19 | } |
||
20 | |||
21 | public function supportsTransformation($data, array $context = []): bool |
||
24 | } |
||
25 | |||
26 | public static function getSubscribedServices(): array |
||
30 | ]; |
||
31 | } |
||
33 |