Skip to content

Commit

Permalink
OXDEV-8215: Add missing defaultLang parameter to ModuleDataTypeFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelOxid committed Aug 6, 2024
1 parent c8f9ab9 commit f200685
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Module/DataType/ModuleDataTypeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ public function createFromCoreModule(
ModuleConfiguration $moduleConfig
): ModuleDataTypeInterface {
$titlesData = $moduleConfig->getTitle();
$translatedTitle = $this->languageService->filterByLanguageAbbreviation(data: $titlesData);
$translatedTitle = $this->languageService->filterByLanguageAbbreviation(
data: $titlesData,
defaultLang: $moduleConfig->getLang()
);

$description = $moduleConfig->getDescription();
$translatedDescription = $this->languageService->filterByLanguageAbbreviation(data: $description);
$translatedDescription = $this->languageService->filterByLanguageAbbreviation(
data: $description,
defaultLang: $moduleConfig->getLang()
);

return new ModuleDataType(
id: $moduleConfig->getId(),
Expand All @@ -37,7 +43,7 @@ public function createFromCoreModule(
author: $moduleConfig->getAuthor(),
url: $moduleConfig->getUrl(),
email: $moduleConfig->getEmail(),
active: (bool) $moduleConfig->isActivated(),
active: $moduleConfig->isActivated(),
);
}
}

0 comments on commit f200685

Please sign in to comment.