diff --git a/Classes/Xclass/ContainerGridColumn.php b/Classes/Xclass/ContainerGridColumn.php index 882c939..f5a63cc 100644 --- a/Classes/Xclass/ContainerGridColumn.php +++ b/Classes/Xclass/ContainerGridColumn.php @@ -17,6 +17,7 @@ use B13\Container\Backend\Grid\ContainerGridColumn as BaseContainerGridColumn; use B13\Container\Domain\Model\Container; +use Psr\Http\Message\ServerRequestInterface; use TYPO3\CMS\Backend\Routing\UriBuilder; use TYPO3\CMS\Backend\View\PageLayoutContext; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -84,7 +85,8 @@ public function getNewContentUrl(): string 'uid_pid' => $this->newContentElementAtTopTarget, ], ], - 'returnUrl' => $GLOBALS['TYPO3_REQUEST']->getAttribute('normalizedParams')->getRequestUri(), + // @extensionScannerIgnoreLine + 'returnUrl' => $this->getRequest()->getAttribute('normalizedParams')->getRequestUri(), ]; $routeName = 'record_edit'; @@ -126,4 +128,9 @@ public function getHiddenItemCount(): int ) ); } + + protected function getRequest(): ServerRequestInterface + { + return $GLOBALS['TYPO3_REQUEST']; + } } diff --git a/Classes/Xclass/ContainerGridColumnItem.php b/Classes/Xclass/ContainerGridColumnItem.php index 3590ec4..b8f934a 100644 --- a/Classes/Xclass/ContainerGridColumnItem.php +++ b/Classes/Xclass/ContainerGridColumnItem.php @@ -16,6 +16,7 @@ namespace Evoweb\EwCollapsibleContainer\Xclass; use B13\Container\Backend\Grid\ContainerGridColumnItem as BaseContainerGridColumnItem; +use Psr\Http\Message\ServerRequestInterface; use TYPO3\CMS\Backend\Routing\UriBuilder; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -42,7 +43,8 @@ public function getNewContentAfterUrl(): string 'uid_pid' => -$this->record['uid'], ], ], - 'returnUrl' => $GLOBALS['TYPO3_REQUEST']->getAttribute('normalizedParams')->getRequestUri(), + // @extensionScannerIgnoreLine + 'returnUrl' => $this->getRequest()->getAttribute('normalizedParams')->getRequestUri(), ]; $routeName = 'record_edit'; @@ -68,4 +70,9 @@ public function isHidden(): bool { return ($this->record['hidden'] ?? 0) > 0; } + + protected function getRequest(): ServerRequestInterface + { + return $GLOBALS['TYPO3_REQUEST']; + } }