framework/RedKiteCms/EventSystem/Listener/Request/ThemeAlignerListener.php
public function onKernelRequest(GetResponseEvent $event)
    {
        $token = $this->securityContext->getToken();
        if (null === $token) {
            return;
        }

        $username = null;
        if ( ! $this->configurationHandler->isTheme()) {
            $username = $token->getUser()->getUsername();
        }
        
        $this->pagesCollectionParser
            ->contributor($username)
            ->parse()
        ;

        $this->themeGenerator->generate();
        $this->slotsGenerator->synchronize($this->page, $this->pagesCollectionParser->pages());
        $this->themeAligner->align($this->pagesCollectionParser);
        $this->slotsGenerator->generate();
    }
public function onKernelRequest(GetResponseEvent $event)
    {
        $token = $this->securityContext->getToken();
        if (null === $token) {
            return;
        }

        $username = null;
        if ( ! $this->configurationHandler->isTheme()) {
            $username = $token->getUser()->getUsername();
        }
        
        $this->pagesCollectionParser
            ->contributor($username)
            ->parse()
        ;

        $this->themeGenerator->generate();
        $this->slotsGenerator->synchronize($this->page, $this->pagesCollectionParser->pages());
        $this->themeAligner->align($this->pagesCollectionParser);
        $this->slotsGenerator->generate();
    }
public function onKernelRequest ( GetResponseEvent $ event ) { $ token = $ this -> securityContext -> getToken ( ) ; if ( null === $ token ) { return ; } $ username = null ; if ( ! $ this -> configurationHandler -> isTheme ( ) ) { $ username = $ token -> getUser ( ) -> getUsername ( ) ; } $ this -> pagesCollectionParser -> contributor ( $ username ) -> parse ( ) ; $ this -> themeGenerator -> generate ( ) ; $ this -> slotsGenerator -> synchronize ( $ this -> page , $ this -> pagesCollectionParser -> pages ( ) ) ; $ this -> themeAligner -> align ( $ this -> pagesCollectionParser ) ; $ this -> slotsGenerator -> generate ( ) ; }
Aligns the site slots

@param GetResponseEvent $event
Aligns the site slots