Skip to content

Commit

Permalink
expose more data for image editable in normalizer (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat authored Apr 11, 2024
1 parent a9eea3a commit 4019d69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Upgrade Notes

## 5.0.5
- Add `caption`, `marker` and `hotspots` to image normalizer

## 5.0.4
- Fix default theme config loader priority

Expand Down
3 changes: 3 additions & 0 deletions src/Normalizer/ImageEditableNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public function normalize(mixed $value, ?string $toolboxContextId = null): mixed
}

return [
'caption' => $value->getText(),
'hotspots' => $value->getHotspots(),
'marker' => $value->getMarker(),
'lightbox' => $this->assetService->generateImageThumbnailFromEditable($value, $imageLightbox),
'image' => $this->assetService->generateImageThumbnailFromEditable($value, $imageElement),
];
Expand Down

0 comments on commit 4019d69

Please sign in to comment.