public function frwFinished(FirstRunWizardFinishedEvent
$event): void
{ // only run on open -> completed|failed transition
if (!
$event->
getPreviousState()->
isOpen() ||
$event->
getState()->
isOpen()) { return;
} $context =
$event->
getContext();
$this->themeLifecycleService->
refreshThemes($context);
$themeCriteria =
new Criteria();
$themeCriteria->
addAssociation('salesChannels'
);
$themeCriteria->
addFilter(new EqualsFilter('technicalName', 'Storefront'
));
/** @var ThemeEntity|null $theme */
$theme =
$this->themeRepository->
search($themeCriteria,
$context)->
first();
if (!
$theme) { throw new \
RuntimeException('Default theme not found'
);
} $themeSalesChannels =
$theme->
getSalesChannels();