/** * Redirecting the user after the processing has been done. * Might also display error messages directly, if any. * * @return void */ public function finish() { // Push errors to flash message queue, if there are any $this->fileProcessor->pushErrorMessagesToFlashMessageQueue(); BackendUtility::setUpdateSignal('updateFolderTree'); if ($this->redirect) { \TYPO3\CMS\Core\Utility\HttpUtility::redirect($this->redirect); } }
/** * Injects the request object for the current request or subrequest * As this controller goes only through the main() method, it just redirects to the given URL afterwards. * * @param ServerRequestInterface $request the current request * @param ResponseInterface $response * @return ResponseInterface the response with the content */ public function mainAction(ServerRequestInterface $request, ResponseInterface $response) { $this->main(); // Push errors to flash message queue, if there are any $this->fileProcessor->pushErrorMessagesToFlashMessageQueue(); BackendUtility::setUpdateSignal('updateFolderTree'); if ($this->redirect) { return $response->withHeader('Location', GeneralUtility::locationHeaderUrl($this->redirect))->withStatus(303); } else { // empty response return $response; } }