Classes/Middleware/TypoScriptRenderingMiddleware.php
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $frontendController = $GLOBALS['TSFE'];
        if (!$frontendController->isGeneratePage() || !isset($request->getQueryParams()[self::argumentNamespace])) {
            return $handler->handle($request);
        }
        $this->ensureRequiredEnvironment();

        $frontendController->config['config']['disableAllHeaderCode'] = 1;
        $frontendController->pSetup = [
            '10' => 'TYPOSCRIPT_RENDERING',
            '10.' => [
                'request' => $request->getQueryParams()[self::argumentNamespace],
            ],
        ];

        return $handler->handle($request);
    }
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $frontendController = $GLOBALS['TSFE'];
        if (!$frontendController->isGeneratePage() || !isset($request->getQueryParams()[self::argumentNamespace])) {
            return $handler->handle($request);
        }
        $this->ensureRequiredEnvironment();

        $frontendController->config['config']['disableAllHeaderCode'] = 1;
        $frontendController->pSetup = [
            '10' => 'TYPOSCRIPT_RENDERING',
            '10.' => [
                'request' => $request->getQueryParams()[self::argumentNamespace],
            ],
        ];

        return $handler->handle($request);
    }
public function process ( ServerRequestInterface $ request , RequestHandlerInterface $ handler ) : ResponseInterface { $ frontendController = $ GLOBALS [ 'TSFE' ] ; if ( ! $ frontendController -> isGeneratePage ( ) || ! isset ( $ request -> getQueryParams ( ) [ self :: argumentNamespace ] ) ) { return $ handler -> handle ( $ request ) ; } $ this -> ensureRequiredEnvironment ( ) ; $ frontendController -> config [ 'config' ] [ 'disableAllHeaderCode' ] = 1 ; $ frontendController -> pSetup = [ '10' => 'TYPOSCRIPT_RENDERING' , '10.' => [ 'request' => $ request -> getQueryParams ( ) [ self :: argumentNamespace ] , ] , ] ; return $ handler -> handle ( $ request ) ; }
Dispatches the request to the corresponding typoscript_rendering configuration

@param ServerRequestInterface $request
@param RequestHandlerInterface $handler
@throws Exception
@return ResponseInterface
Dispatches the request to the corresponding typoscript_rendering configuration