protected function dispatchCurrentPageEvent(Request $request)
    {
        $pageName = $request->get('page');
        $seo = $this->seoRepository->fromPermalink($pageName);
        if (null !== $seo) {
            $page = $this->pageRepository->fromPk($seo->getPageId());
            $pageName = $page->getPageName();
        }

        $eventName = sprintf('page_renderer.before_%s_rendering', $pageName);
        $this->dispatcher->dispatch($eventName, $this->event);
    }
protected function dispatchCurrentPageEvent(Request $request)
    {
        $pageName = $request->get('page');
        $seo = $this->seoRepository->fromPermalink($pageName);
        if (null !== $seo) {
            $page = $this->pageRepository->fromPk($seo->getPageId());
            $pageName = $page->getPageName();
        }

        $eventName = sprintf('page_renderer.before_%s_rendering', $pageName);
        $this->dispatcher->dispatch($eventName, $this->event);
    }
protected function dispatchCurrentPageEvent ( Request $ request ) { $ pageName = $ request -> get ( 'page' ) ; $ seo = $ this -> seoRepository -> fromPermalink ( $ pageName ) ; if ( null !== $ seo ) { $ page = $ this -> pageRepository -> fromPk ( $ seo -> getPageId ( ) ) ; $ pageName = $ page -> getPageName ( ) ; } $ eventName = sprintf ( 'page_renderer.before_%s_rendering' , $ pageName ) ; $ this -> dispatcher -> dispatch ( $ eventName , $ this -> event ) ; }
Overrides the base method to replace the permalink when it is used instad
of the page name

@param Request $request
Overrides the base method to replace the permalink when it is used instad of the page name