diff --git a/src/DataObject/Data/Adapter/ObjectBricksAdapter.php b/src/DataObject/Data/Adapter/ObjectBricksAdapter.php index 64a04ae7..49cfaddf 100644 --- a/src/DataObject/Data/Adapter/ObjectBricksAdapter.php +++ b/src/DataObject/Data/Adapter/ObjectBricksAdapter.php @@ -94,11 +94,10 @@ public function normalize( continue; } - $resultItems[$type] = []; foreach ($definition->getFieldDefinitions() as $brickFieldDefinition) { $getter = 'get' . ucfirst($brickFieldDefinition->getName()); $value = $item->$getter(); - $resultItems[$brickFieldDefinition->getName()] = $this->dataService->getNormalizedValue( + $resultItems[$type][$brickFieldDefinition->getName()] = $this->dataService->getNormalizedValue( $value, $brickFieldDefinition, );