Skip to content

Commit e3dbb00

Browse files
committed
WIP
1 parent d954242 commit e3dbb00

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Hal/Serializer/ItemNormalizer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ public function normalize($object, $format = null, array $context = [])
4747
$resourceClass = $this->resourceClassResolver->getResourceClass($object, $context['resource_class'] ?? null, true);
4848
$context = $this->initContext($resourceClass, $context);
4949
$context['iri'] = $this->iriConverter->getIriFromItem($object);
50+
$context['api_normalize'] = true;
5051

5152
$rawData = parent::normalize($object, $format, $context);
5253
if (!is_array($rawData)) {
5354
return $rawData;
5455
}
5556

5657
$data = ['_links' => ['self' => ['href' => $context['iri']]]];
58+
$context['debug'] = true;
5759
$components = $this->getComponents($object, $format, $context);
5860
$data = $this->populateRelation($data, $object, $format, $context, $components, 'links');
5961
$data = $this->populateRelation($data, $object, $format, $context, $components, 'embedded');

0 commit comments

Comments
 (0)