Skip to content

Commit

Permalink
Move subtype to data
Browse files Browse the repository at this point in the history
  • Loading branch information
mattamon committed Jan 13, 2025
1 parent 0f26fbb commit d46e147
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/DataObject/Data/Adapter/VideoAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,15 @@ public function normalize(mixed $value, Data $fieldDefinition): mixed
}

$data = $fieldDefinition->normalize($value);
$data['subtype'] = $value->getData()?->getType();


if (isset($data['poster'])) {
$data['poster']['fullPath'] = $value->getPoster()?->getRealFullPath();
}

if (isset($data['data'])) {
$data['data']['fullPath'] = $value->getData()?->getRealFullPath();
$data['data']['subtype'] = $value->getData()?->getType();
}

return $data;
Expand Down

0 comments on commit d46e147

Please sign in to comment.