Forwards the request to the last active action.

@throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
199179
protected function forwardToLastModule()
    {
        $moduleData = BackendUtility::getModuleData(
            array('controller' => ''),
            array(),
            $this->argumentsKey
        );

        if ($moduleData['action'] === 'alert') {
            return;
        }

        // Don't need to check if it is an array because getModuleData always
        // returns an array. Only have to check if it's empty.
        if (!empty($moduleData)) {
            $currentController = $this->getControllerName();
            $currentAction = $this->getActionName();
            if ($moduleData['action'] !== '' && $moduleData['action'] !== $currentAction) {
                $this->forward($moduleData['action'], $moduleData['controller']);
            }
        }
    }
125580
public function prev(): void
    {
        if ($this->current instanceof TerminalBucket) {
            return;
        }

        $this->current = $this->current->prev();
        $this->offset--;
    }
833280
protected function userWentBackToPreviousStep()
    {
        return !$this->isAfterLastPage() && !$this->isFirstRequest() && $this->currentPage->getIndex() < $this->lastDisplayedPage->getIndex();
    }
510580
public function preRun()
    {
        
    	$this->options = array('verbose' => false,
        					   'action' => null,
    						   'extension' => null);
        
        $this->options = array_merge($this->options, $this->parameters);
        
        if ($this->options['verbose'] == true) {
        	$this->verbose = true;
        }
        
        // The 'action' parameter is always required.
        if ($this->options['action'] == null) {
        	$this->err("Please enter the 'action' parameter.", true);
        } else {
        	$this->options['action'] = strtolower($this->options['action']);
        	if (!in_array($this->options['action'], array_keys($this->getAllowedActions()))) {
        		$this->err("'" . $this->options['action'] . "' is not a valid action.", true);
        	} else {
        		// The 'action' parameter is ok.
        		// Let's check additional inputs depending on the value of the 'action' parameter.
        		$this->checkInput();	
        	}
        }
        
    }
1180799
public function indexAction()
    {
        return $this->forward()
                    ->dispatch(
                        $this->params()
                             ->fromRoute( 'controller', get_called_class() ),
                        array(
                            'action' => 'list',
                            'locale' => (string) $this->locale(),
                        )
                    );
    }
53267
public function beforeAction($action)
    {
        Yii::$app->response->format = Response::FORMAT_JSON;
        if (!Yii::$app->session->hasSessionId) {
            throw new BadRequestHttpException('Need an active session');
        }
        return parent::beforeAction($action);
    }
150711
public function updateLastAction ()
	{
		
		$arr	= $this->getSessionData ();
		
		$this->lastAction		= time ();
		$arr['last_action']		= $this->lastAction;
		
		$this->session ()->set (get_called_class (), serialize ($arr));
		
	}
1347594
private function actionKeepDefault() {
        $this->match(Token::T_ACTION, true);

        $action = ltrim($this->lastToken->getText(), '@');
        $this->metadata->addMetadata($action, true);
    }
743961
public static function getCurrentAction()
    {
        $request = Request::instance();
        return $request->module() . '/' . $request->controller() . '/' . $request->action();
    }
797350
public function getDispatchAction()
    {
        $args = $this->request->getAsArray('args');
        $arg = array_shift($args);
        if (preg_match('/^(\w+\.\w+)$/', $arg, $matches)) {
            $action = $matches[1];
            return $action;
        }
    }
199916
protected function forward(string $controller, array $action = [], array $params = [])
    {
        return $this->dispatcher->forward([
            'handler' => $controller,
            'action' => $action,
            'params' => $params,
        ]);
    }
1182376
public function onFinish()
    {
        if ($this->eofTerminated) {
            $this->requestFinished();
            $this->onResponse->executeAll($this, false);
            parent::onFinish();
            return;
        }
        if ($this->protocolError) {
            $this->onResponse->executeAll($this, false);
        } else {
            if (($this->state !== self::STATE_ROOT) && !$this->onResponse->isEmpty()) {
                $this->requestFinished();
            }
        }
        parent::onFinish();
    }
1256553
public function handleAction($request, $action)
    {
        // if we submitted a form, let that pass
        if (!$request->isGET() && !$request->isHEAD()) {
            return parent::handleAction($request, $action);
        }

        $url = $request->getURL();

        //
        // If the current request has an extension attached to it, strip that
        // off and redirect the user to the page without an extension.
        //
        if (DocumentationHelper::get_extension($url)) {
            $this->response = new SS_HTTPResponse();
            $this->response->redirect(
                Director::absoluteURL(DocumentationHelper::trim_extension_off($url)) .'/',
                301
            );

            $request->shift();
            $request->shift();

            return $this->response;
        }

        //
        // Strip off the base url
        //
        $base = ltrim(
            Config::inst()->get('DocumentationViewer', 'link_base'),
            '/'
        );

        if ($base && strpos($url, $base) !== false) {
            $url = substr(
                ltrim($url, '/'),
                strlen($base)
            );
        }

        //
        // Handle any permanent redirections that the developer has defined.
        //
        if ($link = DocumentationPermalinks::map($url)) {
            // the first param is a shortcode for a page so redirect the user to
            // the short code.
            $this->response = new SS_HTTPResponse();
            $this->response->redirect($link, 301);

            $request->shift();
            $request->shift();

            return $this->response;
        }

        //
        // Validate the language provided. Language is a required URL parameter.
        // as we use it for generic interfaces and language selection. If
        // language is not set, redirects to 'en'
        //
        $languages = i18n::get_common_languages();

        if (!$lang = $request->param('Lang')) {
            $lang = $request->param('Action');
            $action = $request->param('ID');
        } else {
            $action = $request->param('Action');
        }

        if (!$lang) {
            return $this->redirect($this->Link('en'));
        } elseif (!isset($languages[$lang])) {
            return $this->httpError(404);
        }

        $request->shift(10);

        $allowed = $this->config()->allowed_actions;

        if (in_array($action, $allowed)) {
            //
            // if it's one of the allowed actions such as search or all then the
            // URL must be prefixed with one of the allowed languages and versions
            //
            return parent::handleAction($request, $action);
        } else {
            //
            // look up the manifest to see find the nearest match against the
            // list of the URL. If the URL exists then set that as the current
            // page to match against.

            // strip off any extensions.


            // if($cleaned !== $url) {
            // 	$redirect = new SS_HTTPResponse();

            // 	return $redirect->redirect($cleaned, 302);
            // }
            if ($record = $this->getManifest()->getPage($url)) {
                // In SS 3 offsetSet() isn't implemented for some reason... this is a workaround
                $routeParams = $this->request->routeParams();
                $routeParams['Lang'] = $lang;
                $this->request->setRouteParams($routeParams);

                $this->record = $record;
                $this->init();

                $type = get_class($this->record);
                $body = $this->renderWith(
                    array(
                        "DocumentationViewer_{$type}",
                        'DocumentationViewer'
                    )
                );

                return new SS_HTTPResponse($body, 200);
            } elseif ($redirect = $this->getManifest()->getRedirect($url)) {
                $response = new SS_HTTPResponse();
                $to = Controller::join_links(Director::baseURL(), $base, $redirect);
                return $response->redirect($to, 301);
            } elseif (!$url || $url == $lang) {
                $body = $this->renderWith(
                    array(
                        'DocumentationViewer_DocumentationFolder',
                        'DocumentationViewer'
                    )
                );

                return new SS_HTTPResponse($body, 200);
            }
        }

        return $this->httpError(404);
    }
481041
public function process()
	{
		try
		{
			$view = $this->getView();

			if( ( $id = $view->param( 'sub_id' ) ) != null && $view->param( 'sub_action' ) === 'cancel' ) {
				\Aimeos\Controller\Frontend::create( $this->getContext(), 'subscription' )->cancel( $id );
			}

			parent::process();
		}
		catch( \Exception $e )
		{
			$this->logException( $e );
		}
	}
676010
def forward(self, **kwargs):
        
        # rewrite url path  
        prefix = self.url_prefix
        path= "" if request.path == "/" else request.path
        path = path[len(prefix):]
        url = '%s%s'% ( self.url_root[:-1], path )

        if request.method == 'GET':
            resp = requests.get(url, params=request.args)
            data = json.loads(resp.content)
        elif request.method == 'POST':
            if request.headers['Content-Type'].startswith('application/json'):
                # data in JSON
                resp = requests.post(url, json=request.json)
                data = request.json
            else :
                resp = requests.post(url, json=request.form)
                data = request.form
            data = json.loads(resp.content)
        else:
            # method not allowed aborting
            abort(405) # XXX

        return jsonify(data)
149700
public function updateAction()
    {
        $request = $this->getRequest();
        if ($request->isPost()) {
            if ($this->getRequest()->getQuery('controller')) {
                $redirect = '?controller=' . $this->getRequest()->getQuery('controller')
                    . '&action=' . $this->getRequest()->getQuery('action')
                    . '&locale=' . $this->getRequest()->getQuery('locale');
            } else {
                $redirect = '';
            }

             $data = array_merge(
                 $request->getPost()->toArray(),
                 $request->getFiles()->toArray()
             );
   
            foreach ($data['translate'] as $locale => $values) {
                $return  = $this->getTranslateService()->writeFile($locale, $values);

                if ($return === false) {
                    $this->flashMessenger()->addMessage('The translate has not been updated');

                    return $this->redirect()->toUrl($this->url()->fromRoute('admin/playgroundtranslate') . $redirect);
                }

                $return = $this->getTranslateService()->activeTranslate($locale);

                if ($return === false) {
                    $this->flashMessenger()->addMessage('The translate has not been updated');

                    return $this->redirect()->toUrl($this->url()->fromRoute('admin/playgroundtranslate') . $redirect);
                }
                $this->flashMessenger()->addMessage('The translate has been updated');
            }
            sleep(2);

            return $this->redirect()->toUrl($this->url()->fromRoute('admin/playgroundtranslate') . $redirect);
        }

        return $this->redirect()->toUrl($this->url()->fromRoute('admin/playgroundtranslate') . $redirect);
    }
1075010
public void savePreviousPageInfo( ActionForward forward, ActionForm form, ActionMapping mapping,
                                      HttpServletRequest request, ServletContext servletContext,
                                      boolean isSpecialForward )
    {
        //
        // Special case: if the given forward has a path to a page in the current pageflow, let that pageflow save
        // the info on this page.  Otherwise, don't ever save any info on what we're forwarding to.
        //
        if ( ! isSpecialForward && forward != null )  // i.e., it's a straight Forward to a path, not a navigateTo, etc.
        {
            PageFlowController currentJpf = PageFlowUtils.getCurrentPageFlow( request, getServletContext() );
            
            if ( currentJpf != null )
            {
                if ( forward.getContextRelative() && forward.getPath().startsWith( currentJpf.getModulePath() ) )
                {
                    currentJpf.savePreviousPageInfo( forward, form, mapping, request, servletContext, isSpecialForward );
                }
            }
        }
    }