diff --git a/typo3/sysext/workspaces/Classes/Controller/Remote/ActionHandler.php b/typo3/sysext/workspaces/Classes/Controller/Remote/ActionHandler.php index 84465def9a4dabde5533d42815bdaf231c646aff..cb141f5227a9c6462b4bb14d2ba7b79f0ea824ee 100644 --- a/typo3/sysext/workspaces/Classes/Controller/Remote/ActionHandler.php +++ b/typo3/sysext/workspaces/Classes/Controller/Remote/ActionHandler.php @@ -17,11 +17,11 @@ declare(strict_types=1); namespace TYPO3\CMS\Workspaces\Controller\Remote; +use Psr\Http\Message\ServerRequestInterface; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\View\BackendViewFactory; use TYPO3\CMS\Core\Authentication\BackendUserAuthentication; use TYPO3\CMS\Core\DataHandling\DataHandler; -use TYPO3\CMS\Core\Http\ServerRequest; use TYPO3\CMS\Core\Localization\LanguageService; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\MathUtility; @@ -756,7 +756,7 @@ class ActionHandler * Fetch the current label and visible state of the stage buttons. * Used when records have been pushed to different stages in the preview module to update the button phalanx. */ - public function updateStageChangeButtons(int $id): string + public function updateStageChangeButtons(int $id, ServerRequestInterface $request): string { // Fetch next and previous stage $workspaceItemsArray = $this->workspaceService->selectVersionsInWorkspace( @@ -768,8 +768,7 @@ class ActionHandler ); [, $nextStage] = $this->stagesService->getNextStageForElementCollection($workspaceItemsArray); [, $previousStage] = $this->stagesService->getPreviousStageForElementCollection($workspaceItemsArray); - // @todo: It would of course be better if AjaxDispatcher could hand over $request to the method ... - $view = $this->backendViewFactory->create(new ServerRequest(), ['typo3/cms-workspaces']); + $view = $this->backendViewFactory->create($request, ['typo3/cms-workspaces']); $view->assignMultiple([ 'enablePreviousStageButton' => is_array($previousStage) && !empty($previousStage), 'enableNextStageButton' => is_array($nextStage) && !empty($nextStage),