foreach ($languages as $language) { $languageContext =
new Context( new SystemSource(),
[],
Defaults::CURRENCY,
array_filter([$language->
getId(),
$language->
getParentId(), Defaults::LANGUAGE_SYSTEM
]),
$context->
getVersionId() );
$existingProducts =
$products[$language->
getParentId() ?? Defaults::LANGUAGE_SYSTEM
] ??
[];
$products[$language->
getId()] =
$this->
updateLanguage($ids,
$languageContext,
$existingProducts);
} } public function reset(): void
{ $this->config =
[];
} /**
* @param array<string> $ids
* @param ProductEntity[] $existingProducts
*
* @return ProductEntity[]
*/