// check provided language is part of the available languages
if (!\
in_array($current,
$availableLanguageIds, true
)) { throw SalesChannelException::
providedLanguageNotAvailable($current,
$availableLanguageIds);
} if ($current === Defaults::LANGUAGE_SYSTEM
) { return [Defaults::LANGUAGE_SYSTEM
];
} // provided language can be a child language
return array_filter([$current,
$this->
getParentLanguageId($current), Defaults::LANGUAGE_SYSTEM
]);
} /**
* @return CashRoundingConfig[]
*/
private function getCashRounding(CurrencyEntity
$currency, ShippingLocation
$shippingLocation, Context
$context): array
{ $criteria =
new Criteria();
$criteria->
setTitle('base-context-factory::cash-rounding'
);
$criteria->
setLimit(1
);
$criteria->
addFilter(new EqualsFilter('currencyId',
$currency->
getId()));