/** * Forwards the request to another action and / or controller. * * Request is directly transferred to the other action / controller * without the need for a new request. * * @param string $actionName Name of the action to forward to * @param string $controllerName Unqualified object name of the controller to forward to. If not specified, the current controller is used. * @param string $extensionName Name of the extension containing the controller to forward to. If not specified, the current extension is assumed. * @param array $arguments Arguments to pass to the target action * @return void * @throws StopActionException * @see redirect() * @api */ public function forward($actionName, $controllerName = null, $extensionName = null, array $arguments = null) { $this->request->setDispatched(false); if ($this->request instanceof WebRequest) { $this->request->setControllerActionName($actionName); if ($controllerName !== null) { $this->request->setControllerName($controllerName); } if ($extensionName !== null) { $this->request->setControllerExtensionName($extensionName); } } if ($arguments !== null) { $this->request->setArguments($arguments); } throw new StopActionException('forward', 1476045801); }
/** * Forwards the request to another action and / or controller. * * Request is directly transferred to the other action / controller * without the need for a new request. * * @param string $actionName Name of the action to forward to * @param string $controllerName Unqualified object name of the controller to forward to. If not specified, the current controller is used. * @param string $extensionName Name of the extension containing the controller to forward to. If not specified, the current extension is assumed. * @param array $arguments Arguments to pass to the target action * @return void * @throws StopActionException * @see redirect() * @api */ public function forward($actionName, $controllerName = NULL, $extensionName = NULL, array $arguments = NULL) { $this->request->setDispatched(FALSE); if ($this->request instanceof WebRequest) { $this->request->setControllerActionName($actionName); if ($controllerName !== NULL) { $this->request->setControllerName($controllerName); } if ($extensionName !== NULL) { $this->request->setControllerExtensionName($extensionName); } } if ($arguments !== NULL) { $this->request->setArguments($arguments); } throw new StopActionException(); }
/** * Override the action name if found in the uc of the user * * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request * @param \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException */ public function processRequest(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response) { $vars = GeneralUtility::_GET('tx_indexedsearch_web_indexedsearchisearch'); $beUser = $this->getBackendUserAuthentication(); if (is_array($vars) && isset($vars['action']) && method_exists($this, $vars['action'] . 'Action')) { $action = $vars['action']; switch ($action) { case 'saveStopwordsKeywords': $action = 'statisticDetails'; break; case 'deleteIndexedItem': $action = 'statistic'; break; } $beUser->uc['indexed_search']['action'] = $action; $beUser->uc['indexed_search']['arguments'] = $request->getArguments(); $beUser->writeUC(); } elseif (isset($beUser->uc['indexed_search']['action'])) { if ($request instanceof WebRequest) { $request->setControllerActionName($beUser->uc['indexed_search']['action']); } if (isset($beUser->uc['indexed_search']['arguments'])) { $request->setArguments($beUser->uc['indexed_search']['arguments']); } } parent::processRequest($request, $response); }