else { $themeData['active'
] = true;
} $themeData['translations'
] =
$this->
getTranslationsConfiguration($configuration,
$context);
$updatedData =
$this->
updateMediaInConfiguration($theme,
$configuration,
$context);
$themeData =
array_merge($themeData,
$updatedData);
if (!
empty($configuration->
getConfigInheritance())) { $themeData =
$this->
addParentTheme($configuration,
$themeData,
$context);
} $writtenEvent =
$this->themeRepository->
upsert([$themeData],
$context);
if (empty($themeData['id'
])) { $themeData['id'
] =
current($writtenEvent->
getPrimaryKeys(ThemeDefinition::ENTITY_NAME
));
} $this->themeRepository->
upsert([$themeData],
$context);
if (!
empty($themeData['toDeleteMedia'
])) {