feat: streamlined display of hotel image, name and address

This commit is contained in:
Björn Fromme committed 2026-03-16 12:02:27 +01:00
1 parent b351b4042f
commit 6ede062a66
3 files changed
+20 -9

No files matched your search

+5 -3
View File
@@ -31,20 +31,22 @@ class CmsDataService
}
/**
* Fetches only the hotel images from the CMS using normalized codes.
* Fetches only the hotel images from the CMS.
*
* The product code is normalized for CMS lookup while the hotel code
* is passed as-is for better matching results.
*
* @return array<string, mixed>|null The images array or null if unavailable
*/
public function getProductImages(string $productCode, ?string $hotelCode = null): ?array
{
$normalizedProduct = $this->normalizeCode($productCode);
$normalizedHotel = $this->normalizeCode($hotelCode);
if (null === $normalizedProduct) {
return null;
}
$result = $this->getProductDetails($normalizedProduct, $normalizedHotel);
$result = $this->getProductDetails($normalizedProduct, $hotelCode);
if (true === isset($result['success']) && false === $result['success']) {
return null;