Skip to content
Snippets Groups Projects
Commit ade07ed6 authored by Matthias Adrowski's avatar Matthias Adrowski
Browse files

[TASK] Add forward and general Response for v11

parent 7123dab1
No related branches found
No related tags found
1 merge request!38Feature upgrade to typo3 11
......@@ -118,9 +118,19 @@ class OverviewController extends AbstractController {
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
* @throws \TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException
*/
public function overviewAction(array $newsFilter = [], int $currentPageBrowserPage = 0) {
public function overviewAction(array $newsFilter = [], int $currentPageBrowserPage = 0): ?\Psr\Http\Message\ResponseInterface {
if ((int) $this->settings['groupBy'] === 0 && (bool) $this->settings['enableFilter'] === FALSE) {
$this->forward('overviewWithoutCategories', NULL, NULL, $this->request->getArguments());
if (version_compare(
\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '11.0.0', '<'
)) {
$this->forward('overviewWithoutCategories', NULL, NULL, $this->request->getArguments());
}
else {
return (new \TYPO3\CMS\Extbase\Http\ForwardResponse(
'overviewWithoutCategories'
))
->withArguments($this->request->getArguments());
}
}
// Setup settings
......@@ -312,6 +322,12 @@ class OverviewController extends AbstractController {
default:
$this->view->assign('groupBy', 'none');
}
if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '11.0.0', '<')) {
return NULL;
} else {
return $this->htmlResponse();
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment