|
|
@@ -12,13 +12,10 @@ use TYPO3\CMS\Core\Error\PageErrorHandler\PageContentErrorHandler;
|
|
|
use TYPO3\CMS\Core\Error\PageErrorHandler\PageErrorHandlerInterface;
|
|
|
use TYPO3\CMS\Core\Http\HtmlResponse;
|
|
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
|
-use TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext;
|
|
|
use TYPO3\CMS\Extbase\Mvc\Request;
|
|
|
-use TYPO3\CMS\Extbase\Mvc\View\ViewInterface;
|
|
|
-use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
|
|
|
-use TYPO3\CMS\Extbase\Object\ObjectManager;
|
|
|
use TYPO3\CMS\Fluid\Core\Rendering\RenderingContext;
|
|
|
use TYPO3\CMS\Fluid\View\TemplateView;
|
|
|
+use TYPO3Fluid\Fluid\View\ViewInterface;
|
|
|
|
|
|
class ErrorHandler implements PageErrorHandlerInterface
|
|
|
{
|
|
|
@@ -62,6 +59,20 @@ class ErrorHandler implements PageErrorHandlerInterface
|
|
|
$this->errorHandlerConfiguration = $configuration;
|
|
|
|
|
|
$this->view = GeneralUtility::makeInstance(TemplateView::class);
|
|
|
+
|
|
|
+ $this->otWebsiteRepository = GeneralUtility::makeInstance(OtWebsiteRepository::class);
|
|
|
+ $this->otPageRepository = GeneralUtility::makeInstance(OtPageRepository::class);
|
|
|
+
|
|
|
+ $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
|
|
|
+ $this->otWebsiteRepository->injectConnectionPool($connectionPool);
|
|
|
+
|
|
|
+ $pageRepository = GeneralUtility::makeInstance(PageRepository::class);
|
|
|
+ $this->otPageRepository->injectPageRepository($pageRepository);
|
|
|
+ $this->otPageRepository->injectConnectionPool($connectionPool);
|
|
|
+
|
|
|
+ $this->request = GeneralUtility::makeInstance(Request::class);
|
|
|
+
|
|
|
+ $this->renderingContext = GeneralUtility::makeInstance(RenderingContext::class);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -107,22 +118,7 @@ class ErrorHandler implements PageErrorHandlerInterface
|
|
|
string $message,
|
|
|
array $reasons = []
|
|
|
): ResponseInterface {
|
|
|
-
|
|
|
- $this->otWebsiteRepository = GeneralUtility::makeInstance(OtWebsiteRepository::class);
|
|
|
- $this->otPageRepository = GeneralUtility::makeInstance(OtPageRepository::class);
|
|
|
-
|
|
|
- $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
|
|
|
- $this->otWebsiteRepository->injectConnectionPool($connectionPool);
|
|
|
-
|
|
|
- $pageRepository = GeneralUtility::makeInstance(PageRepository::class);
|
|
|
- $this->otPageRepository->injectPageRepository($pageRepository);
|
|
|
- $this->otPageRepository->injectConnectionPool($connectionPool);
|
|
|
-
|
|
|
- $this->request = GeneralUtility::makeInstance(Request::class);
|
|
|
-
|
|
|
- $this->renderingContext = GeneralUtility::makeInstance(RenderingContext::class);
|
|
|
-
|
|
|
-// $this->request->setControllerExtensionName('ot_templating');
|
|
|
+ $this->request->setControllerExtensionName('ot_templating');
|
|
|
$this->renderingContext->setRequest($this->request);
|
|
|
|
|
|
$this->view->setRenderingContext($this->renderingContext);
|