MaintenancePageLoadedHook example

'@Storefront/storefront/page/error/error-maintenance.html.twig'
            );

            $response->setStatusCode(Response::HTTP_SERVICE_UNAVAILABLE, 'Service Temporarily Unavailable');
            $response->headers->set('Retry-After', '3600');

            return $response;
        }

        $maintenancePage = $this->maintenancePageLoader->load($maintenanceLayoutId$request$context);

        $this->hook(new MaintenancePageLoadedHook($maintenancePage$context));

        $response = $this->renderStorefront(
            '@Storefront/storefront/page/error/error-maintenance.html.twig',
            ['page' => $maintenancePage]
        );

        $response->setStatusCode(Response::HTTP_SERVICE_UNAVAILABLE, 'Service Temporarily Unavailable');
        $response->headers->set('Retry-After', '3600');

        return $response;
    }

    
Home | Imprint | This part of the site doesn't use cookies.