'Enlight_Controller_Front_DispatchLoopShutdown' => 'onDispatchLoopShutdown',
];
} public function onDispatchLoopShutdown(Enlight_Event_EventArgs
$args): void
{ /** @var Enlight_Controller_Request_Request $request */
$request =
$args->
get('request'
);
// Only use Server Push if it is enabled in the settings and the current module is "frontend"
if (!
$this->pushEnabled
||
$request->
getModuleName() !== 'frontend'
) { return;
} /** @var Enlight_Controller_Response_Response $response */
$response =
$args->
get('response'
);
$linkProvider =
$this->webLinkManager->
getLinkProvider();
if (!
$linkProvider instanceof LinkProviderInterface
) { return;
}