public function onKernelRequestIndex(GetResponseEvent $event)
    {
        $request = $event->getRequest();
        $semanticPathinfo = $request->attributes->get('semanticPathinfo') ?: '/';
        if (
            $event->getRequestType() === HttpKernelInterface::MASTER_REQUEST
            && $semanticPathinfo === '/'
        ) {
            $indexPage = $this->configResolver->getParameter('index_page');
            if ($indexPage !== null) {
                $indexPage = '/' . ltrim($indexPage, '/');
                $request->attributes->set('semanticPathinfo', $indexPage);
                $request->attributes->set('needsForward', true);
            }
        }
    }
public function onKernelRequestIndex(GetResponseEvent $event)
    {
        $request = $event->getRequest();
        $semanticPathinfo = $request->attributes->get('semanticPathinfo') ?: '/';
        if (
            $event->getRequestType() === HttpKernelInterface::MASTER_REQUEST
            && $semanticPathinfo === '/'
        ) {
            $indexPage = $this->configResolver->getParameter('index_page');
            if ($indexPage !== null) {
                $indexPage = '/' . ltrim($indexPage, '/');
                $request->attributes->set('semanticPathinfo', $indexPage);
                $request->attributes->set('needsForward', true);
            }
        }
    }
public function onKernelRequestIndex ( GetResponseEvent $ event ) { $ request = $ event -> getRequest ( ) ; $ semanticPathinfo = $ request -> attributes -> get ( 'semanticPathinfo' ) ? : '/' ; if ( $ event -> getRequestType ( ) === HttpKernelInterface :: MASTER_REQUEST && $ semanticPathinfo === '/' ) { $ indexPage = $ this -> configResolver -> getParameter ( 'index_page' ) ; if ( $ indexPage !== null ) { $ indexPage = '/' . ltrim ( $ indexPage , '/' ) ; $ request -> attributes -> set ( 'semanticPathinfo' , $ indexPage ) ; $ request -> attributes -> set ( 'needsForward' , true ) ; } } }
Checks if the IndexPage is configured and which page must be shown.

@param GetResponseEvent $event
Checks if the IndexPage is configured and which page must be shown .