public function onKernelRequestSetup(GetResponseEvent $event)
    {
        if ($event->getRequestType() == HttpKernelInterface::MASTER_REQUEST) {
            if ($this->defaultSiteAccess !== 'setup') {
                return;
            }

            $request = $event->getRequest();
            $requestContext = $this->router->getContext();
            $requestContext->fromRequest($request);
            $this->router->setContext($requestContext);
            $setupURI = $this->router->generate('ezpublishSetup');

            if (($requestContext->getBaseUrl() . $request->getPathInfo()) === $setupURI) {
                return;
            }

            $event->setResponse(new RedirectResponse($setupURI));
        }
    }
public function onKernelRequestSetup(GetResponseEvent $event)
    {
        if ($event->getRequestType() == HttpKernelInterface::MASTER_REQUEST) {
            if ($this->defaultSiteAccess !== 'setup') {
                return;
            }

            $request = $event->getRequest();
            $requestContext = $this->router->getContext();
            $requestContext->fromRequest($request);
            $this->router->setContext($requestContext);
            $setupURI = $this->router->generate('ezpublishSetup');

            if (($requestContext->getBaseUrl() . $request->getPathInfo()) === $setupURI) {
                return;
            }

            $event->setResponse(new RedirectResponse($setupURI));
        }
    }
public function onKernelRequestSetup ( GetResponseEvent $ event ) { if ( $ event -> getRequestType ( ) == HttpKernelInterface :: MASTER_REQUEST ) { if ( $ this -> defaultSiteAccess !== 'setup' ) { return ; } $ request = $ event -> getRequest ( ) ; $ requestContext = $ this -> router -> getContext ( ) ; $ requestContext -> fromRequest ( $ request ) ; $ this -> router -> setContext ( $ requestContext ) ; $ setupURI = $ this -> router -> generate ( 'ezpublishSetup' ) ; if ( ( $ requestContext -> getBaseUrl ( ) . $ request -> getPathInfo ( ) ) === $ setupURI ) { return ; } $ event -> setResponse ( new RedirectResponse ( $ setupURI ) ) ; } }
Checks if it's needed to redirect to setup wizard.

@param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event
Checks if it s needed to redirect to setup wizard .