try { $this->shopIdProvider->
getShopId();
} catch (AppUrlChangeDetectedException
) { return [];
} $appModules =
[];
foreach ($apps as $app) { $modules =
$this->
formatModules($app,
$context);
$mainModule =
$this->
formatMainModule($app,
$context);
if (empty($modules) &&
$mainModule === null
) { continue;
} $appModules[] =
[ 'name' =>
$app->
getName(),
'label' =>
$this->
mapTranslatedLabels($app),
'modules' =>
$modules,
'mainModule' =>
$mainModule,
];
}