private readonly FooterPageletLoaderInterface
$footerLoader,
private readonly SystemConfigService
$systemConfigService,
private readonly AbstractPaymentMethodRoute
$paymentMethodRoute,
private readonly AbstractShippingMethodRoute
$shippingMethodRoute,
private readonly EventDispatcherInterface
$eventDispatcher ) { } public function load(Request
$request, SalesChannelContext
$context): Page
{ return Profiler::
trace('generic-page-loader',
function D
) use ($request,
$context) { $page =
new Page();
if ($request->
isXmlHttpRequest()) { $this->eventDispatcher->
dispatch( new GenericPageLoadedEvent($page,
$context,
$request) );
return $page;
} $page->
setHeader( $this->headerLoader->
load($request,
$context) );