From 0160ff712256ff0f94053ab3f62efdc9538e36df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Nyk=C3=A4nen?= Date: Thu, 23 Jan 2025 09:03:42 +0200 Subject: [PATCH] allow returning both string and translatablemarkup --- modules/helfi_media_map/src/Entity/HelMap.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/helfi_media_map/src/Entity/HelMap.php b/modules/helfi_media_map/src/Entity/HelMap.php index 67253f0fd..240387177 100644 --- a/modules/helfi_media_map/src/Entity/HelMap.php +++ b/modules/helfi_media_map/src/Entity/HelMap.php @@ -28,10 +28,10 @@ public function getServiceUrl(): ?string { /** * Get the title of map. * - * @return \Drupal\Core\StringTranslation\TranslatableMarkup|null + * @return \Drupal\Core\StringTranslation\TranslatableMarkup|string|null * The title of the map. */ - public function getMediaTitle(): ?TranslatableMarkup { + public function getMediaTitle(): ?string|TranslatableMarkup { return $this->get('field_media_hel_map') ->first() ->get('title')