@@ 66-73 (lines=8) @@ | ||
63 | */ |
|
64 | public function normalize($object, $format = null, array $context = []) |
|
65 | { |
|
66 | if (isset($context['api_sub_level'])) { |
|
67 | $data = []; |
|
68 | foreach ($object as $index => $obj) { |
|
69 | $data[$index] = $this->normalizer->normalize($obj, $format, $context); |
|
70 | } |
|
71 | ||
72 | return $data; |
|
73 | } |
|
74 | ||
75 | $resourceClass = $this->resourceClassResolver->getResourceClass($object, $context['resource_class'] ?? null, true); |
|
76 | $data = $this->addJsonLdContext($this->contextBuilder, $resourceClass, $context); |
@@ 60-66 (lines=7) @@ | ||
57 | public function normalize($object, $format = null, array $context = []) |
|
58 | { |
|
59 | $data = []; |
|
60 | if (isset($context['api_sub_level'])) { |
|
61 | foreach ($object as $index => $obj) { |
|
62 | $data[$index] = $this->normalizer->normalize($obj, $format, $context); |
|
63 | } |
|
64 | ||
65 | return $data; |
|
66 | } |
|
67 | ||
68 | $context = $this->initContext( |
|
69 | $this->resourceClassResolver->getResourceClass($object, $context['resource_class'] ?? null, true), |