Skip to content

Commit

Permalink
allow returning both string and translatablemarkup
Browse files Browse the repository at this point in the history
  • Loading branch information
rpnykanen committed Jan 23, 2025
1 parent ce61b97 commit 0160ff7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/helfi_media_map/src/Entity/HelMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 0160ff7

Please sign in to comment.