source/Core/Controller/BaseController.php
protected function _executeNewAction($sNewAction)
    {
        if ($sNewAction) {
            $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

            // page parameters is the part which goes after '?'
            $params = explode('?', $sNewAction);

            // action parameters is the part before '?'
            $pageParams = isset($params[1]) ? $params[1] : null;

            // looking for function name
            $params = explode('/', $params[0]);
            $className = $params[0];
            $resolvedClassName = \OxidEsales\Eshop\Core\Registry::getControllerClassNameResolver()->getClassNameById($className);
            $realClassName = $resolvedClassName ? \OxidEsales\Eshop\Core\Registry::getUtilsObject()->getClassName($resolvedClassName) : \OxidEsales\Eshop\Core\Registry::getUtilsObject()->getClassName($className);

            if (false === class_exists($realClassName)) {
                //If redirect tries to use a not existing class throw an exception.
                //we'll be redirected to start page directly.
                $exception =  new \OxidEsales\Eshop\Core\Exception\SystemComponentException();
                /** Use setMessage here instead of passing it in constructor in order to test exception message */
                $exception->setMessage('ERROR_MESSAGE_SYSTEMCOMPONENT_CLASSNOTFOUND' . ' ' . $className);
                $exception->setComponent($className);
                throw $exception;
            }

            // building redirect path ...
            $header = ($className) ? "cl=$className&" : ''; // adding view name
            $header .= ($pageParams) ? "$pageParams&" : ''; // adding page params
            $header .= $this->getSession()->sid(); // adding session Id

            $url = $myConfig->getCurrentShopUrl($this->isAdmin());

            $url = "{$url}index.php?{$header}";

            $url = \OxidEsales\Eshop\Core\Registry::getUtilsUrl()->processUrl($url);

            if (\OxidEsales\Eshop\Core\Registry::getUtils()->seoIsActive() && $seoUrl = \OxidEsales\Eshop\Core\Registry::getSeoEncoder()->getStaticUrl($url)) {
                $url = $seoUrl;
            }

            $this->onExecuteNewAction();

            $this->dispatchEvent(new AfterRequestProcessedEvent);

            //#M341 do not add redirect parameter
            \OxidEsales\Eshop\Core\Registry::getUtils()->redirect($url, (bool) $myConfig->getRequestParameter('redirected'), 302);
        }
    }
protected function _executeNewAction($sNewAction)
    {
        if ($sNewAction) {
            $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

            // page parameters is the part which goes after '?'
            $params = explode('?', $sNewAction);

            // action parameters is the part before '?'
            $pageParams = isset($params[1]) ? $params[1] : null;

            // looking for function name
            $params = explode('/', $params[0]);
            $className = $params[0];
            $resolvedClassName = \OxidEsales\Eshop\Core\Registry::getControllerClassNameResolver()->getClassNameById($className);
            $realClassName = $resolvedClassName ? \OxidEsales\Eshop\Core\Registry::getUtilsObject()->getClassName($resolvedClassName) : \OxidEsales\Eshop\Core\Registry::getUtilsObject()->getClassName($className);

            if (false === class_exists($realClassName)) {
                //If redirect tries to use a not existing class throw an exception.
                //we'll be redirected to start page directly.
                $exception =  new \OxidEsales\Eshop\Core\Exception\SystemComponentException();
                /** Use setMessage here instead of passing it in constructor in order to test exception message */
                $exception->setMessage('ERROR_MESSAGE_SYSTEMCOMPONENT_CLASSNOTFOUND' . ' ' . $className);
                $exception->setComponent($className);
                throw $exception;
            }

            // building redirect path ...
            $header = ($className) ? "cl=$className&" : ''; // adding view name
            $header .= ($pageParams) ? "$pageParams&" : ''; // adding page params
            $header .= $this->getSession()->sid(); // adding session Id

            $url = $myConfig->getCurrentShopUrl($this->isAdmin());

            $url = "{$url}index.php?{$header}";

            $url = \OxidEsales\Eshop\Core\Registry::getUtilsUrl()->processUrl($url);

            if (\OxidEsales\Eshop\Core\Registry::getUtils()->seoIsActive() && $seoUrl = \OxidEsales\Eshop\Core\Registry::getSeoEncoder()->getStaticUrl($url)) {
                $url = $seoUrl;
            }

            $this->onExecuteNewAction();

            $this->dispatchEvent(new AfterRequestProcessedEvent);

            //#M341 do not add redirect parameter
            \OxidEsales\Eshop\Core\Registry::getUtils()->redirect($url, (bool) $myConfig->getRequestParameter('redirected'), 302);
        }
    }
protected function _executeNewAction ( $ sNewAction ) { if ( $ sNewAction ) { $ myConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; // page parameters is the part which goes after '?' $ params = explode ( '?' , $ sNewAction ) ; // action parameters is the part before '?' $ pageParams = isset ( $ params [ 1 ] ) ? $ params [ 1 ] : null ; // looking for function name $ params = explode ( '/' , $ params [ 0 ] ) ; $ className = $ params [ 0 ] ; $ resolvedClassName = \ OxidEsales \ Eshop \ Core \ Registry :: getControllerClassNameResolver ( ) -> getClassNameById ( $ className ) ; $ realClassName = $ resolvedClassName ? \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsObject ( ) -> getClassName ( $ resolvedClassName ) : \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsObject ( ) -> getClassName ( $ className ) ; if ( false === class_exists ( $ realClassName ) ) { //If redirect tries to use a not existing class throw an exception. //we'll be redirected to start page directly. $ exception = new \ OxidEsales \ Eshop \ Core \ Exception \ SystemComponentException ( ) ; /** Use setMessage here instead of passing it in constructor in order to test exception message */ $ exception -> setMessage ( 'ERROR_MESSAGE_SYSTEMCOMPONENT_CLASSNOTFOUND' . ' ' . $ className ) ; $ exception -> setComponent ( $ className ) ; throw $ exception ; } // building redirect path ... $ header = ( $ className ) ? "cl=$className&" : '' ; // adding view name $ header .= ( $ pageParams ) ? "$pageParams&" : '' ; // adding page params $ header .= $ this -> getSession ( ) -> sid ( ) ; // adding session Id $ url = $ myConfig -> getCurrentShopUrl ( $ this -> isAdmin ( ) ) ; $ url = "{$url}index.php?{$header}" ; $ url = \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsUrl ( ) -> processUrl ( $ url ) ; if ( \ OxidEsales \ Eshop \ Core \ Registry :: getUtils ( ) -> seoIsActive ( ) && $ seoUrl = \ OxidEsales \ Eshop \ Core \ Registry :: getSeoEncoder ( ) -> getStaticUrl ( $ url ) ) { $ url = $ seoUrl ; } $ this -> onExecuteNewAction ( ) ; $ this -> dispatchEvent ( new AfterRequestProcessedEvent ) ; //#M341 do not add redirect parameter \ OxidEsales \ Eshop \ Core \ Registry :: getUtils ( ) -> redirect ( $ url , ( bool ) $ myConfig -> getRequestParameter ( 'redirected' ) , 302 ) ; } }
Formats header for new controller action

Input example: "view_name?param1=val1&param2=val2" => "cl=view_name&param1=val1&param2=val2"

@param string $sNewAction new action params

@throws \OxidEsales\Eshop\Core\Exception\SystemComponentException system component exception
Formats header for new controller action