return array_replace_recursive($baseThemeConfig,
$configuredTheme);
} /**
* @param array<string, ThemeEntity> $parentThemes
*
* @return array<string, ThemeEntity>
*/
private function getParentThemeIds(ThemeCollection
$themes, ThemeEntity
$mainTheme, array
$parentThemes =
[]): array
{ // add configured parent themes
foreach ($this->
getConfigInheritance($mainTheme) as $parentThemeName) { $parentTheme =
$themes->
filter(fn (ThemeEntity
$themeEntry) =>
$themeEntry->
getTechnicalName() ===
str_replace('@', '',
$parentThemeName))->
first();
if (!
($parentTheme instanceof ThemeEntity
)) { continue;
} if (\
array_key_exists($parentTheme->
getId(),
$parentThemes)) { continue;
} $parentThemes[$parentTheme->
getId()] =
$parentTheme;