private function normalizeCmsRequestAttributes(Request $request, DataManager $dataManager)
    {
        if ($request->getMethod() == 'POST') {
            return;
        }

        $page = $dataManager->getPage();
        if (null !== $page) {
            $request->attributes->set('page', $page->getPageName());
        }

        $language = $dataManager->getLanguage();
        if (null !== $language) {
            $request->attributes->set('_locale', $language->getLanguageName());
        }

        $seo = $dataManager->getSeo();
        if (null !== $seo) {
            $request->attributes->set('permalink', $seo->getPermalink());
        }
    }
private function normalizeCmsRequestAttributes(Request $request, DataManager $dataManager)
    {
        if ($request->getMethod() == 'POST') {
            return;
        }

        $page = $dataManager->getPage();
        if (null !== $page) {
            $request->attributes->set('page', $page->getPageName());
        }

        $language = $dataManager->getLanguage();
        if (null !== $language) {
            $request->attributes->set('_locale', $language->getLanguageName());
        }

        $seo = $dataManager->getSeo();
        if (null !== $seo) {
            $request->attributes->set('permalink', $seo->getPermalink());
        }
    }
private function normalizeCmsRequestAttributes ( Request $ request , DataManager $ dataManager ) { if ( $ request -> getMethod ( ) == 'POST' ) { return ; } $ page = $ dataManager -> getPage ( ) ; if ( null !== $ page ) { $ request -> attributes -> set ( 'page' , $ page -> getPageName ( ) ) ; } $ language = $ dataManager -> getLanguage ( ) ; if ( null !== $ language ) { $ request -> attributes -> set ( '_locale' , $ language -> getLanguageName ( ) ) ; } $ seo = $ dataManager -> getSeo ( ) ; if ( null !== $ seo ) { $ request -> attributes -> set ( 'permalink' , $ seo -> getPermalink ( ) ) ; } }
Normalizes the request attributes for page, language and permalink for a
GET request

This method normalizes RedKite CMS parameters, injecting all the attributes
required to define a page.

When a page is requested by the language and page name attributes, the permalink attribute is
filled up, while a page is requested by permalink, the language and page name are filled up to.

@param Request $request
@param DataManager $dataManager
Normalizes the request attributes for page language and permalink for a GET request