Skip to content
Snippets Groups Projects
Commit 51e3e558 authored by Thijs Kinkhorst's avatar Thijs Kinkhorst
Browse files

Remove type from getEntityPropertyTranslation

Not all properties are of string type in metadata, so we need to
remove this so we can use the function for any type of language
keyed metadata item.
parent 5ca4aa85
No related branches found
No related tags found
No related merge requests found
...@@ -632,9 +632,11 @@ class Template extends Response ...@@ -632,9 +632,11 @@ class Template extends Response
/** /**
* Search through entity metadata to find the best value for a * Search through entity metadata to find the best value for a
* specific property. It will search in order for the current language, default * specific property. It will search in order for the current language, default
* language and fallback language; if not found it returns null. * language and fallback language; it will return the property value (which
* can be a string, array or other type allowed in metadta, if not found it
* returns null.
*/ */
public function getEntityPropertyTranslation(string $property, array $data): ?string public function getEntityPropertyTranslation(string $property, array $data)
{ {
$tryLanguages = $this->translator->getLanguage()->getPreferredLanguages(); $tryLanguages = $this->translator->getLanguage()->getPreferredLanguages();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment