public function onKernelRequest(GetResponseEvent $event)
    {
        if ($event->getRequestType() !== HttpKernelInterface::MASTER_REQUEST) {
            return;
        }

        $request = $event->getRequest();

        if (1 === intval($request->query->get('cms-editor-enable', 0))) {
            $this->editor->setEnabled(true);
        }
        if (0 < intval($width = $request->request->get('cms_viewport_width', 0))) {
            $this->editor->setViewportWidth($width);
        }

        if (null !== $page = $this->pageHelper->init($request)) {
            if (!$page->isEnabled()) {
                if ($this->authorizationChecker->isGranted('ROLE_ADMIN')) {
                    $this->session->getFlashBag()->add('warning', 'ekyna_cms.page.alert.disabled.allow_as_admin');

                    return;
                }

                $this->session->getFlashBag()->add('warning', 'ekyna_cms.page.alert.disabled.temporary_redirect');
                throw new NotFoundHttpException('Disabled page.');
            }
        }
    }