$salesChannels =
$this->salesChannelRepository->
search($criteria, Context::
createDefaultContext())->
getEntities();
$data =
[];
foreach ($salesChannels as $salesChannel) { /** @var LanguageEntity $language */
$language =
$salesChannel->
getLanguage();
/** @var LanguageCollection $languages */
$languages =
$salesChannel->
getLanguages();
/** @var CurrencyEntity $currency */
$currency =
$salesChannel->
getCurrency();
/** @var CurrencyCollection $currencies */
$currencies =
$salesChannel->
getCurrencies();
/** @var SalesChannelDomainCollection $domains */
$domains =
$salesChannel->
getDomains();
$data[] =
[ $salesChannel->
getId(),
$salesChannel->
getName(),
$salesChannel->
getActive() ? 'active' : 'inactive',
$salesChannel->
isMaintenance() ? 'on' : 'off',
$language->
getName(),
$languages->
map(fn (LanguageEntity
$language) =>
$language->
getName()),
$currency->
getName(),