public function postDispatch(\Mmi\Http\Request $request)
    {
        //ustawienie widoku
        $view = \Mmi\App\FrontController::getInstance()->getView();
        $base = $view->baseUrl;
        $view->domain = \App\Registry::$config->host;
        $view->languages = \App\Registry::$config->languages;
        $jsRequest = $request->toArray();
        $jsRequest['baseUrl'] = $base;
        $jsRequest['locale'] = \App\Registry::$translate->getLocale();
        unset($jsRequest['controller']);
        unset($jsRequest['action']);
        //umieszczenie tablicy w headScript()
        $view->headScript()->prependScript('var request = ' . json_encode($jsRequest));
    }
public function postDispatch(\Mmi\Http\Request $request)
    {
        //ustawienie widoku
        $view = \Mmi\App\FrontController::getInstance()->getView();
        $base = $view->baseUrl;
        $view->domain = \App\Registry::$config->host;
        $view->languages = \App\Registry::$config->languages;
        $jsRequest = $request->toArray();
        $jsRequest['baseUrl'] = $base;
        $jsRequest['locale'] = \App\Registry::$translate->getLocale();
        unset($jsRequest['controller']);
        unset($jsRequest['action']);
        //umieszczenie tablicy w headScript()
        $view->headScript()->prependScript('var request = ' . json_encode($jsRequest));
    }
public function postDispatch ( \ Mmi \ Http \ Request $ request ) { //ustawienie widoku $ view = \ Mmi \ App \ FrontController :: getInstance ( ) -> getView ( ) ; $ base = $ view -> baseUrl ; $ view -> domain = \ App \ Registry :: $ config -> host ; $ view -> languages = \ App \ Registry :: $ config -> languages ; $ jsRequest = $ request -> toArray ( ) ; $ jsRequest [ 'baseUrl' ] = $ base ; $ jsRequest [ 'locale' ] = \ App \ Registry :: $ translate -> getLocale ( ) ; unset ( $ jsRequest [ 'controller' ] ) ; unset ( $ jsRequest [ 'action' ] ) ; //umieszczenie tablicy w headScript() $ view -> headScript ( ) -> prependScript ( 'var request = ' . json_encode ( $ jsRequest ) ) ; }
Wykonywana po dispatcherze
@param \Mmi\Http\Request $request
Wykonywana po dispatcherze