public function load(ExtensionCollection
$localCollection, Context
$context): ExtensionCollection
{ $this->
addUpdateInformation($localCollection,
$context);
$this->
addStoreInformation($localCollection,
$context);
return $this->
sortCollection($localCollection);
} private function addStoreInformation(ExtensionCollection
$localCollection, Context
$context): void
{ try { $storeExtensions =
$this->client->
listMyExtensions($localCollection,
$context);
} catch (\Throwable
) { return;
} foreach ($storeExtensions->
getElements() as $storeExtension) { if ($localCollection->
has($storeExtension->
getName())) { /** @var ExtensionStruct $localExtension */
$localExtension =
$localCollection->
get($storeExtension->
getName());
$localExtension->
setId($storeExtension->
getId());
$localExtension->
setIsTheme($storeExtension->
isTheme());
$localExtension->
setStoreExtension($storeExtension);