private function getSalesChannelDomain(string
$salesChannelDomainId, Context
$context): SalesChannelDomainEntity
{ $criteria =
(new Criteria([$salesChannelDomainId])) ->
addAssociation('language.locale'
) ->
addAssociation('salesChannel'
);
$salesChannelDomain =
$this->salesChannelDomainRepository->
search( $criteria,
$context )->
get($salesChannelDomainId);
if (!
($salesChannelDomain instanceof SalesChannelDomainEntity
)) { $salesChannelDomainNotFoundException =
new SalesChannelDomainNotFoundException($salesChannelDomainId);
$loggingEvent =
new ProductExportLoggingEvent( $context,
$salesChannelDomainNotFoundException->
getMessage(),
Level::Error,
$salesChannelDomainNotFoundException );
$this->eventDispatcher->
dispatch($loggingEvent);
throw $salesChannelDomainNotFoundException;
}