$localApps =
$this->
loadLocalAppsCollection($context);
foreach ($localApps as $name =>
$app) { if ($registeredApps->
has($name)) { /** @var ExtensionStruct $registeredApp */
$registeredApp =
$registeredApps->
get($name);
$registeredApp->
setIsTheme($app->
isTheme());
// Set version of local app to registered app if newer
if (version_compare((string) $app->
getVersion(),
(string) $registeredApp->
getVersion(), '>'
)) { $registeredApp->
setLatestVersion($app->
getVersion());
} continue;
} $registeredApps->
set($name,
$app);
} return $registeredApps;
}