If you need help solving this exception, you can have a look at the TYPO3 Documentation. There you can find solutions provided by the TYPO3 community. Once you have found a solution to the problem, help others by contributing to the documentation page.
Find a solution for this exception in the TYPO3 Documentation.
public function createParsingRelatedExceptionWithContext(\Exception $error, $templateIdentifier) { list ($line, $character, $templateCode) = $this->getCurrentParsingPointers(); $exceptionClass = get_class($error); return new $exceptionClass( sprintf( 'Fluid parse error in template %s, line %d at character %d. Error: %s (error code %d). Template source chunk: %s', $templateIdentifier, $line,
$splitTemplate = $this->splitTemplateAtDynamicTags($templateString); $parsingState = $this->buildObjectTree($splitTemplate, self::CONTEXT_OUTSIDE_VIEWHELPER_ARGUMENTS); } catch (Exception $error) { throw $this->createParsingRelatedExceptionWithContext($error, $templateIdentifier); } $this->parsedTemplates[$templateIdentifier] = $parsingState; return $parsingState; }
*/ protected function parseTemplateSource($templateIdentifier, $templateSourceClosure) { $parsedTemplate = $this->parse( $templateSourceClosure($this, $this->renderingContext->getTemplatePaths()), $templateIdentifier ); $parsedTemplate->setIdentifier($templateIdentifier); $this->parsedTemplates[$templateIdentifier] = $parsedTemplate;
if ($parsedTemplate instanceof UncompilableTemplateInterface) { $parsedTemplate = $this->parseTemplateSource($templateIdentifier, $templateSourceClosure); } } else { $parsedTemplate = $this->parseTemplateSource($templateIdentifier, $templateSourceClosure); try { $compiler->store($templateIdentifier, $parsedTemplate); } catch (StopCompilingException $stop) { $this->renderingContext->getErrorHandler()->handleCompilerError($stop);
$parsedTemplate = $templateParser->getOrParseAndStoreTemplate( $templatePaths->getTemplateIdentifier($controllerName, $actionName), function($parent, TemplatePaths $paths) use ($controllerName, $actionName, $renderingContext) { return $paths->getTemplateSource($controllerName, $actionName); } ); if ($parsedTemplate->isCompiled()) { $parsedTemplate->addCompiledNamespaces($this->baseRenderingContext); }
$actionName = ucfirst($actionName); $renderingContext->setControllerAction($actionName); } try { $parsedTemplate = $this->getCurrentParsedTemplate(); } catch (PassthroughSourceException $error) { return $error->getSource(); }
$actionResult = $this->{$this->errorMethodName}(); } if ($actionResult === null && $this->view instanceof ViewInterface) { $this->response->appendContent($this->view->render()); } elseif (is_string($actionResult) && $actionResult !== '') { $this->response->appendContent($actionResult); } elseif (is_object($actionResult) && method_exists($actionResult, '__toString')) { $this->response->appendContent((string)$actionResult);
$this->view = $this->resolveView(); if ($this->view !== null) { $this->initializeView($this->view); } $this->callActionMethod(); $this->renderAssetsForRequest($request); } /**
*/ public function processRequest(RequestInterface $request, ResponseInterface $response) { try { parent::processRequest($request, $response); } catch (\Exception $exception) { $this->handleKnownExceptionsElseThrowAgain($exception); } }
throw new \TYPO3\CMS\Extbase\Mvc\Exception\InfiniteLoopException('Could not ultimately dispatch the request after ' . $dispatchLoopCount . ' iterations. Most probably, a @' . \TYPO3\CMS\Extbase\Annotation\IgnoreValidation::class . ' annotation is missing on re-displaying a form with validation errors.', 1217839467); } $controller = $this->resolveController($request); try { $controller->processRequest($request, $response); } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $ignoredException) { } } $this->emitAfterRequestDispatchSignal($request, $response);
} /** @var \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response */ $response = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Web\Response::class); $this->dispatcher->dispatch($request, $response); return $response; } /**
/** @var \TYPO3\CMS\Extbase\Mvc\RequestHandlerResolver $requestHandlerResolver */ $requestHandlerResolver = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\RequestHandlerResolver::class); $requestHandler = $requestHandlerResolver->resolveRequestHandler(); $response = $requestHandler->handleRequest(); // If response is NULL after handling the request we need to stop // This happens for instance, when a USER object was converted to a USER_INT // @see TYPO3\CMS\Extbase\Mvc\Web\FrontendRequestHandler::handleRequest() if ($response === null) {
*/ public function run($content, $configuration) { $this->initialize($configuration); return $this->handleRequest(); } /** * @throws \TYPO3\CMS\Extbase\Mvc\Exception\CommandException Is thrown if the response object defined an exit code > 0
$classObj, $parts[1] ], [ $content, $conf ]); } else { $this->getTimeTracker()->setTSlogMessage('Method "' . $parts[1] . '" did not exist in class "' . $parts[0] . '"', 3); }
if ($this->cObj->getUserObjectType() === false) { // Come here only if we are not called from $TSFE->INTincScript_process()! $this->cObj->setUserObjectType(ContentObjectRenderer::OBJECTTYPE_USER); } $tempContent = $this->cObj->callUserFunction($conf['userFunc'], $conf, ''); if ($this->cObj->doConvertToUserIntObject) { $this->cObj->doConvertToUserIntObject = false; $content = $this->cObj->cObjGetSingle('USER_INT', $conf); } else {
} // Render content try { $content .= $contentObject->render($configuration); } catch (ContentRenderingException $exception) { // Content rendering Exceptions indicate a critical problem which should not be // caught e.g. when something went wrong with Exception handling itself throw $exception;
} if (!$hooked) { $contentObject = $this->getContentObject($name); if ($contentObject) { $content .= $this->render($contentObject, $conf); } else { // Call hook functions for extra processing if ($name) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] ?? [] as $className) {
if ($timeTracker->LR) { $timeTracker->push('/f:cObject/', '<' . $typoscriptObjectPath); } $timeTracker->incStackPointer(); $content = $contentObjectRenderer->cObjGetSingle($setup[$lastSegment], $setup[$lastSegment . '.'] ?? [], $typoscriptObjectPath); $timeTracker->decStackPointer(); if ($timeTracker->LR) { $timeTracker->pull($content); }
'No Content Object definition found at TypoScript object path "' . $typoscriptObjectPath . '"', 1540246570 ); } $content = self::renderContentObject($contentObjectRenderer, $setup, $typoscriptObjectPath, $lastSegment); if (!isset($GLOBALS['TSFE']) || !($GLOBALS['TSFE'] instanceof TypoScriptFrontendController)) { static::resetFrontendEnvironment(); } return $content;
$array5 = array ( );$arguments1['data'] = $renderingContext->getVariableProvider()->getByPath('data', $array5); $arguments1['table'] = 'tt_content'; $renderChildrenClosure2 = ($arguments1['data'] !== null) ? function() use ($arguments1) { return $arguments1['data']; } : $renderChildrenClosure2; $output0 .= TYPO3\CMS\Fluid\ViewHelpers\CObjectViewHelper::renderStatic($arguments1, $renderChildrenClosure2, $renderingContext); $output0 .= ' ';
); } } $this->startRendering($renderingTypeOnNextLevel, $parsedTemplate, $renderingContext); $output = $parsedTemplate->$methodNameOfSection($renderingContext); $this->stopRendering(); } else { $sections = $parsedTemplate->getVariableContainer()->get('1457379500_sections'); if (!isset($sections[$sectionName])) {
$content = (new $delegate())->render($renderingContext); } elseif ($partial !== null) { $content = $view->renderPartial($partial, $section, $variables, $optional); } elseif ($section !== null) { $content = $view->renderSection($section, $variables, $optional); } elseif (!$optional) { throw new \InvalidArgumentException('ViewHelper f:render called without either argument section, partial, renderable or delegate and optional flag is false'); } // Replace empty content with default value. If default is
), $renderingContext ); $output6 .= TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper::renderStatic($arguments48, $renderChildrenClosure49, $renderingContext); $output6 .= ' '; // Rendering ViewHelper TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper
if (isset($arguments['then'])) { return $arguments['then']; } if (isset($arguments['__thenClosure'])) { return $arguments['__thenClosure'](); } } elseif (!empty($arguments['__elseClosures'])) { $elseIfClosures = isset($arguments['__elseifClosures']) ? $arguments['__elseifClosures'] : []; return static::evaluateElseClosures($arguments['__elseClosures'], $elseIfClosures, $renderingContext);
'; return $output68; }; $output3 .= TYPO3Fluid\Fluid\ViewHelpers\IfViewHelper::renderStatic($arguments4, $renderChildrenClosure5, $renderingContext); $output3 .= ' '; return $output3;
* @return string */ public static function renderStatic(array $arguments, \Closure $childClosure, RenderingContextInterface $renderingContext) { return trim(preg_replace('/\\>\\s+\\</', '><', $childClosure())); } }
return $output3; }; $arguments1 = array(); $output0 .= TYPO3Fluid\Fluid\ViewHelpers\SpacelessViewHelper::renderStatic($arguments1, $renderChildrenClosure2, $renderingContext); $output0 .= ' ';
} catch (PassthroughSourceException $error) { return $error->getSource(); } $this->startRendering(self::RENDERING_LAYOUT, $parsedTemplate, $this->baseRenderingContext); $output = $parsedLayout->render($this->baseRenderingContext); $this->stopRendering(); } return $output;
* @return string */ protected function renderFluidView() { return $this->view->render(); } /** * Apply standard wrap to content
$this->view->assignMultiple($variables); $this->renderFluidTemplateAssetsIntoPageRenderer(); $content = $this->renderFluidView(); $content = $this->applyStandardWrapToRenderedContent($content, $conf); $this->view = $parentView; return $content;
} // Render content try { $content .= $contentObject->render($configuration); } catch (ContentRenderingException $exception) { // Content rendering Exceptions indicate a critical problem which should not be // caught e.g. when something went wrong with Exception handling itself throw $exception;
} if (!$hooked) { $contentObject = $this->getContentObject($name); if ($contentObject) { $content .= $this->render($contentObject, $conf); } else { // Call hook functions for extra processing if ($name) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] ?? [] as $className) {
list($name, $conf) = $cF->getVal($key, $this->getTypoScriptFrontendController()->tmpl->setup); $conf = array_replace_recursive(is_array($conf) ? $conf : [], $confOverride); // Getting the cObject $timeTracker->incStackPointer(); $content .= $this->cObjGetSingle($name, $conf, $key); $timeTracker->decStackPointer(); } else { $hooked = false; // Application defined cObjects
// If no "default" property is available, then an empty string is returned if ($key === 'default' && !isset($conf['default'])) { $theValue = ''; } else { $theValue = $this->cObj->cObjGetSingle($conf[$key], $conf[$key . '.'] ?? [], $key); } if (isset($conf['stdWrap.'])) { $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']); }
} // Render content try { $content .= $contentObject->render($configuration); } catch (ContentRenderingException $exception) { // Content rendering Exceptions indicate a critical problem which should not be // caught e.g. when something went wrong with Exception handling itself throw $exception;
} if (!$hooked) { $contentObject = $this->getContentObject($name); if ($contentObject) { $content .= $this->render($contentObject, $conf); } else { // Call hook functions for extra processing if ($name) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] ?? [] as $className) {
list($name, $conf) = $cF->getVal($key, $this->getTypoScriptFrontendController()->tmpl->setup); $conf = array_replace_recursive(is_array($conf) ? $conf : [], $confOverride); // Getting the cObject $timeTracker->incStackPointer(); $content .= $this->cObjGetSingle($name, $conf, $key); $timeTracker->decStackPointer(); } else { $hooked = false; // Application defined cObjects
$cObj->parentRecordNumber = $this->cObj->currentRecordNumber; $GLOBALS['TSFE']->currentRecord = $val['table'] . ':' . $val['id']; $this->cObj->lastChanged($row['tstamp']); $cObj->start($row, $val['table']); $tmpValue = $cObj->cObjGetSingle($renderObjName, $renderObjConf, $renderObjKey); $theValue .= $tmpValue; } } }
} // Render content try { $content .= $contentObject->render($configuration); } catch (ContentRenderingException $exception) { // Content rendering Exceptions indicate a critical problem which should not be // caught e.g. when something went wrong with Exception handling itself throw $exception;
} if (!$hooked) { $contentObject = $this->getContentObject($name); if ($contentObject) { $content .= $this->render($contentObject, $conf); } else { // Call hook functions for extra processing if ($name) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] ?? [] as $className) {
// It's should not be allowed to do this again then!! if (false === empty($parent)) { ++$GLOBALS['TSFE']->recordRegister[$parent]; } $html = $GLOBALS['TSFE']->cObj->cObjGetSingle('RECORDS', $conf); $GLOBALS['TSFE']->currentRecord = $parent; if (false === empty($parent)) { --$GLOBALS['TSFE']->recordRegister[$parent];
$this->contentObject->cObjGetSingle('LOAD_REGISTER', $this->arguments['loadRegister']); } $elements = []; foreach ($rows as $row) { array_push($elements, static::renderRecord($row)); } if (false === empty($this->arguments['loadRegister'])) { $this->contentObject->cObjGetSingle('RESTORE_REGISTER', ''); }
$contentRecords = $this->getSlideRecords($pageUid, $limit); } if (true === (boolean) $this->arguments['render']) { $contentRecords = $this->getRenderedRecords($contentRecords); } return $contentRecords; }
if ('BE' === TYPO3_MODE) { return ''; } $content = $this->getContentRecords(); if (false === $this->hasArgument('as')) { return implode(LF, $content); }
*/ protected function callRenderMethod() { if (method_exists($this, 'render')) { return call_user_func([$this, 'render']); } if ((new \ReflectionMethod($this, 'renderStatic'))->getDeclaringClass()->getName() !== AbstractViewHelper::class) { // Method is safe to call - will not recurse through ViewHelperInvoker via the default // implementation of renderStatic() on this class.
{ $this->validateArguments(); $this->initialize(); return $this->callRenderMethod(); } /** * Call the render() method and handle errors.
} $viewHelper->setRenderingContext($renderingContext); $viewHelper->setArguments($evaluatedArguments); $viewHelper->handleAdditionalArguments($undeclaredArguments); return $viewHelper->initializeArgumentsAndRender(); } catch (Exception $error) { return $renderingContext->getErrorHandler()->handleViewHelperError($error); } }
*/ public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) { $viewHelperClassName = get_called_class(); return $renderingContext->getViewHelperInvoker()->invoke($viewHelperClassName, $arguments, $renderingContext, $renderChildrenClosure); } /** * Save the associated ViewHelper node in a static public class variable.
$arguments29['slideCollectReverse'] = false; $arguments29['as'] = NULL; $arguments29['column'] = 0; $output28 .= FluidTYPO3\Vhs\ViewHelpers\Content\RenderViewHelper::renderStatic($arguments29, $renderChildrenClosure30, $renderingContext); $output28 .= ' <!--TYPO3SEARCH_end--> ';
public function renderChildren() { if ($this->renderChildrenClosure !== null) { $closure = $this->renderChildrenClosure; return $closure(); } return $this->viewHelperNode->evaluateChildNodes($this->renderingContext); }
} $this->templateVariableContainer->add('xlScale', $xlScaleNew); $output = $this->renderChildren(); $GLOBALS['TSFE']->register['xsScale'] = $xsScale; $GLOBALS['TSFE']->register['smScale'] = $smScale; $GLOBALS['TSFE']->register['mdScale'] = $mdScale;
$strClass .= ' ' . $this->arguments['class']; $output = parent::render($xs, $sm, $md, $lg); $tagBuilder = new TagBuilder($this->arguments['tag'] ?? 'div', $output); $tagBuilder->addAttribute('class', $strClass); if ($this->arguments['role'] !== null) {
*/ protected function callRenderMethod() { if (method_exists($this, 'render')) { return call_user_func([$this, 'render']); } if ((new \ReflectionMethod($this, 'renderStatic'))->getDeclaringClass()->getName() !== AbstractViewHelper::class) { // Method is safe to call - will not recurse through ViewHelperInvoker via the default // implementation of renderStatic() on this class.
{ $this->validateArguments(); $this->initialize(); return $this->callRenderMethod(); } /** * Call the render() method and handle errors.
} $viewHelper->setRenderingContext($renderingContext); $viewHelper->setArguments($evaluatedArguments); $viewHelper->handleAdditionalArguments($undeclaredArguments); return $viewHelper->initializeArgumentsAndRender(); } catch (Exception $error) { return $renderingContext->getErrorHandler()->handleViewHelperError($error); } }
*/ public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) { $viewHelperClassName = get_called_class(); return $renderingContext->getViewHelperInvoker()->invoke($viewHelperClassName, $arguments, $renderingContext, $renderChildrenClosure); } /** * Save the associated ViewHelper node in a static public class variable.
$arguments26['role'] = NULL; $arguments26['lg'] = 9; $arguments26['class'] = 'col-main o-1 o-sm-1 o-md-1 o-lg-2'; $output25 .= WapplerSystems\WsT3bootstrap\ViewHelpers\ColumnViewHelper::renderStatic($arguments26, $renderChildrenClosure27, $renderingContext); $output25 .= '
); } } $this->startRendering($renderingTypeOnNextLevel, $parsedTemplate, $renderingContext); $output = $parsedTemplate->$methodNameOfSection($renderingContext); $this->stopRendering(); } else { $sections = $parsedTemplate->getVariableContainer()->get('1457379500_sections'); if (!isset($sections[$sectionName])) {
$content = (new $delegate())->render($renderingContext); } elseif ($partial !== null) { $content = $view->renderPartial($partial, $section, $variables, $optional); } elseif ($section !== null) { $content = $view->renderSection($section, $variables, $optional); } elseif (!$optional) { throw new \InvalidArgumentException('ViewHelper f:render called without either argument section, partial, renderable or delegate and optional flag is false'); } // Replace empty content with default value. If default is
$arguments22['contentAs'] = NULL; $arguments22['debug'] = true; $arguments22['section'] = 'Content'; $output0 .= TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper::renderStatic($arguments22, $renderChildrenClosure23, $renderingContext); $output0 .= ' </main>
} catch (PassthroughSourceException $error) { return $error->getSource(); } $this->startRendering(self::RENDERING_LAYOUT, $parsedTemplate, $this->baseRenderingContext); $output = $parsedLayout->render($this->baseRenderingContext); $this->stopRendering(); } return $output;
); $paths->fillDefaultsByPackageName(GeneralUtility::camelCaseToLowerCaseUnderscored($vendorLessExtensionName)); $paths->setTemplatePathAndFilename($templatePathAndFilename); } $content = $this->view->render(); } else { $foreignControllerClass = $this->configurationService ->getResolver() ->resolveFluxControllerClassNameByExtensionKeyAndControllerName(
$controllerActionName = $this->provider->getControllerActionFromRecord($row); $actualActionName = null !== $requestActionName ? $requestActionName : $controllerActionName; $controllerName = $this->request->getControllerName(); return $this->performSubRendering( $controllerExtensionKey, $controllerName, $actualActionName, $pluginSignature );
} $validationResult = $this->arguments->validate(); if (!$validationResult->hasErrors()) { $this->emitBeforeCallActionMethodSignal($preparedArguments); $actionResult = $this->{$this->actionMethodName}(...$preparedArguments); } else { $actionResult = $this->{$this->errorMethodName}(); }
$this->view = $this->resolveView(); if ($this->view !== null) { $this->initializeView($this->view); } $this->callActionMethod(); $this->renderAssetsForRequest($request); } /**
throw new \TYPO3\CMS\Extbase\Mvc\Exception\InfiniteLoopException('Could not ultimately dispatch the request after ' . $dispatchLoopCount . ' iterations. Most probably, a @' . \TYPO3\CMS\Extbase\Annotation\IgnoreValidation::class . ' annotation is missing on re-displaying a form with validation errors.', 1217839467); } $controller = $this->resolveController($request); try { $controller->processRequest($request, $response); } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $ignoredException) { } } $this->emitAfterRequestDispatchSignal($request, $response);
} /** @var \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response */ $response = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Web\Response::class); $this->dispatcher->dispatch($request, $response); return $response; } /**
/** @var \TYPO3\CMS\Extbase\Mvc\RequestHandlerResolver $requestHandlerResolver */ $requestHandlerResolver = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\RequestHandlerResolver::class); $requestHandler = $requestHandlerResolver->resolveRequestHandler(); $response = $requestHandler->handleRequest(); // If response is NULL after handling the request we need to stop // This happens for instance, when a USER object was converted to a USER_INT // @see TYPO3\CMS\Extbase\Mvc\Web\FrontendRequestHandler::handleRequest() if ($response === null) {
*/ public function run($content, $configuration) { $this->initialize($configuration); return $this->handleRequest(); } /** * @throws \TYPO3\CMS\Extbase\Mvc\Exception\CommandException Is thrown if the response object defined an exit code > 0
$content = $bootstrap->run(null,[ 'extensionName' => 'WsT3bootstrap', 'vendorName' => 'WapplerSystems', 'pluginName' => 'Page', 'variables' => $variables, ]); $content = $this->applyStandardWrapToRenderedContent($content, $conf);
} // Render content try { $content .= $contentObject->render($configuration); } catch (ContentRenderingException $exception) { // Content rendering Exceptions indicate a critical problem which should not be // caught e.g. when something went wrong with Exception handling itself throw $exception;
} if (!$hooked) { $contentObject = $this->getContentObject($name); if ($contentObject) { $content .= $this->render($contentObject, $conf); } else { // Call hook functions for extra processing if ($name) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] ?? [] as $className) {
foreach ($sKeyArray as $theKey) { $theValue = $setup[$theKey]; if ((int)$theKey && strpos($theKey, '.') === false) { $conf = $setup[$theKey . '.']; $content .= $this->cObjGetSingle($theValue, $conf, $addKey . $theKey); } } return $content; }
* @return string */ protected function generatePageContent(TypoScriptFrontendController $controller): string { $pageContent = $controller->cObj->cObjGet($controller->pSetup) ?: ''; if ($controller->pSetup['wrap'] ?? false) { $pageContent = $controller->cObj->wrap($pageContent, $controller->pSetup['wrap']); } if ($controller->pSetup['stdWrap.'] ?? false) {
*/ protected function generatePageContentWithHeader(TypoScriptFrontendController $controller, ?SiteLanguage $siteLanguage): string { // Generate the page content, this has to be first, as some additional TSFE-related code could have been written $pageContent = $this->generatePageContent($controller); $pageRenderer = $this->getPageRenderer(); if ($controller->config['config']['moveJsFromHeaderToFooter'] ?? false) { $pageRenderer->enableMoveJsFromHeaderToFooter(); }
// If 'disableAllHeaderCode' is set, all the header-code is discarded if ($controller->config['config']['disableAllHeaderCode'] ?? false) { $controller->content = $this->generatePageContent($controller); } else { $controller->content = $this->generatePageContentWithHeader($controller, $request->getAttribute('language', null)); } $this->timeTracker->pull($this->timeTracker->LR ? $controller->content : ''); $this->timeTracker->decStackPointer();
// Throw away all output that may have happened during bootstrapping by weird extensions ob_clean(); // Initialize output compression if configured $this->initializeOutputCompression(); return $handler->handle($request); } /** * Initialize output compression if configured
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
} } } } return $handler->handle($request); } /** * Returns TRUE if an edit-action is sent from the Admin Panel
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
* @return ResponseInterface */ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $response = $handler->handle($request); if ( !($response instanceof NullResponse) && $GLOBALS['TSFE'] instanceof TypoScriptFrontendController && $GLOBALS['TSFE']->isOutputting()
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
* @return ResponseInterface */ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $response = $handler->handle($request); if ( !($response instanceof NullResponse) && $GLOBALS['TSFE'] instanceof TypoScriptFrontendController && $GLOBALS['TSFE']->isOutputting()
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
* @return ResponseInterface */ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $response = $handler->handle($request); if ( !($response instanceof NullResponse) && $GLOBALS['TSFE'] instanceof TypoScriptFrontendController && $GLOBALS['TSFE']->isOutputting()) {
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
return new RedirectResponse($externalUrl, 303); } } return $handler->handle($request); } protected function getRedirectUri(ServerRequestInterface $request): ?string {
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
GeneralUtility::makeInstance($className)->checkDataSubmission($this->controller); } } return $handler->handle($request); } /** * Small helper function to convert charsets for arrays to UTF-8
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
['code' => PageAccessFailureReasons::CACHEHASH_COMPARISON_FAILED] ); } } return $handler->handle($request); } /** * Calculates a hash string based on additional parameters in the url.
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
) { return GeneralUtility::makeInstance(ErrorController::class)->unavailableAction($request, 'This page is temporarily unavailable.'); } // Continue the regular stack if no maintenance mode is active return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
} $this->controller->determineId(); } return $handler->handle($request); } /** * Provides ways to bypass the '?id=[xxx]&type=[xx]' format, using either PATH_INFO or Server Rewrites
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
// Caching is disabled, because otherwise generated URLs could include the ADMCMD_noBeUser parameter $GLOBALS['TSFE']->set_no_cache('GET Parameter ADMCMD_noBeUser was given', true); } $response = $handler->handle($request); // Add a info box to the frontend content if ($GLOBALS['TSFE']->doWorkspacePreview() && $GLOBALS['TSFE']->isOutputting()) { $previewInfo = $this->renderPreviewInfo($GLOBALS['TSFE'], $request->getAttribute('normalizedParams'));
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$showHiddenRecords = ($this->context->hasAspect('visibility') ? $this->context->getAspect('visibility')->includeHidden() : false); $GLOBALS['TSFE']->fePreview = ($simulatingDate || $simulatingGroup || $showHiddenRecords); } return $handler->handle($request); } /** * Simulate dates for preview functionality
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
return $response; } } return $handler->handle($request); } /** * Creates a PSR-7 compatible Response object
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
return new HtmlResponse($content, 200, ['Content-Type' => $contentType]); } } return $handler->handle($request); } /** * Find the proper configuration for the static route in the static route configuration. Mainly:
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$uri = $requestedUri->withPath(rtrim($requestedUri->getPath(), '/')); return new RedirectResponse($uri, 307); } } return $handler->handle($request); } /** * Checks if the language is allowed in Frontend, if not, check if there is valid BE user *
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$beUser = $GLOBALS['BE_USER']; $beUser->adminPanel = GeneralUtility::makeInstance(AdminPanelView::class); $beUser->extAdmEnabled = true; } return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
// At this point, we later get further route modifiers // for bw-compat we update $GLOBALS[TYPO3_REQUEST] to be used later in TSFE. $GLOBALS['TYPO3_REQUEST'] = $request; return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class); $connection = $connectionPool->getConnectionByName(ConnectionPool::DEFAULT_CONNECTION_NAME); $connection->getConfiguration()->setSQLLogger(GeneralUtility::makeInstance(DoctrineSqlLogger::class)); } return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
Bootstrap::loadExtTables(); $this->setBackendUserAspect(GeneralUtility::makeInstance(Context::class), $GLOBALS['BE_USER']); } return $handler->handle($request); } /** * Creates the backend user object and returns it.
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
// Register the frontend user as aspect $this->setFrontendUserAspect(GeneralUtility::makeInstance(Context::class), $frontendUser); return $handler->handle($request); } /** * It's possible to transfer a frontend user session via a GET/POST parameter 'FE_SESSION_KEY'.
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
GeneralUtility::callUserFunction($_funcRef, $_params, $GLOBALS['TSFE']); } } return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
{ $eID = $request->getParsedBody()['eID'] ?? $request->getQueryParams()['eID'] ?? null; if ($eID === null) { return $handler->handle($request); } // Remove any output produced until now ob_clean();
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$hookParameters = []; GeneralUtility::callUserFunction($hookFunction, $hookParameters, $hookParameters); } } return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
// refactored to have ServerRequest object available where it is needed. This global will be // deprecated then and removed. $GLOBALS['TYPO3_REQUEST'] = $request; return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
); $timeTracker->start(); $timeTracker->push(''); return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
* @return ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface { return $this->tip->handle($request); } /** * Seed the middleware stack with the inner request handler
{ $requestHandler = GeneralUtility::makeInstance($this->requestHandler); $dispatcher = $this->createMiddlewareDispatcher($requestHandler); return $dispatcher->handle($request); } /** * Set up the application and shut it down afterwards
if (!$this->checkIfEssentialConfigurationExists()) { return $this->installToolRedirect(); } $this->initializeContext(); return parent::handle($request); } /** * Check if LocalConfiguration.php and PackageStates.php exist
final public function run(callable $execute = null) { try { $response = $this->handle( \TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals() ); if ($execute !== null) { call_user_func($execute); }
// Set up the application for the frontend call_user_func(function () { $classLoader = require __DIR__.'/vendor/autoload.php'; \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE); \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Frontend\Http\Application::class)->run(); });
call_user_func(function () { $classLoader = require __DIR__.'/vendor/autoload.php'; \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE); \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Frontend\Http\Application::class)->run(); });
if (!isset($this->resolvedViewHelperClassNames[$namespaceIdentifier][$methodIdentifier])) { $resolvedViewHelperClassName = $this->resolveViewHelperName($namespaceIdentifier, $methodIdentifier); $actualViewHelperClassName = implode('\\', array_map('ucfirst', explode('.', $resolvedViewHelperClassName))); if (false === class_exists($actualViewHelperClassName) || $actualViewHelperClassName === false) { throw new ParserException(sprintf( 'The ViewHelper "<%s:%s>" could not be resolved.' . chr(10) . 'Based on your spelling, the system would load the class "%s", however this class does not exist.', $namespaceIdentifier, $methodIdentifier,
* @return ViewHelperInterface */ public function createViewHelperInstance($namespace, $viewHelperShortName) { $className = $this->resolveViewHelperClassName($namespace, $viewHelperShortName); return $this->createViewHelperInstanceFromClassName($className); } /**
if (!$viewHelperResolver->isNamespaceValid($namespaceIdentifier)) { throw new UnknownNamespaceException('Unknown Namespace: ' . $namespaceIdentifier); } $viewHelper = $viewHelperResolver->createViewHelperInstance($namespaceIdentifier, $methodIdentifier); $argumentDefinitions = $viewHelper->prepareArguments(); $viewHelperNode = $this->initializeViewHelperAndAddItToStack( $state, $namespaceIdentifier,
if (preg_match(Patterns::$SCAN_PATTERN_TEMPLATE_VIEWHELPERTAG, $templateElement, $matchedVariables) > 0) { try { if ($this->openingViewHelperTagHandler( $state, $matchedVariables['NamespaceIdentifier'], $matchedVariables['MethodIdentifier'], $matchedVariables['Attributes'], ($matchedVariables['Selfclosing'] === '' ? false : true),
$templateString = $this->preProcessTemplateSource($templateString); $splitTemplate = $this->splitTemplateAtDynamicTags($templateString); $parsingState = $this->buildObjectTree($splitTemplate, self::CONTEXT_OUTSIDE_VIEWHELPER_ARGUMENTS); } catch (Exception $error) { throw $this->createParsingRelatedExceptionWithContext($error, $templateIdentifier); } $this->parsedTemplates[$templateIdentifier] = $parsingState;
*/ protected function parseTemplateSource($templateIdentifier, $templateSourceClosure) { $parsedTemplate = $this->parse( $templateSourceClosure($this, $this->renderingContext->getTemplatePaths()), $templateIdentifier ); $parsedTemplate->setIdentifier($templateIdentifier); $this->parsedTemplates[$templateIdentifier] = $parsedTemplate;
if ($parsedTemplate instanceof UncompilableTemplateInterface) { $parsedTemplate = $this->parseTemplateSource($templateIdentifier, $templateSourceClosure); } } else { $parsedTemplate = $this->parseTemplateSource($templateIdentifier, $templateSourceClosure); try { $compiler->store($templateIdentifier, $parsedTemplate); } catch (StopCompilingException $stop) { $this->renderingContext->getErrorHandler()->handleCompilerError($stop);
$parsedTemplate = $templateParser->getOrParseAndStoreTemplate( $templatePaths->getTemplateIdentifier($controllerName, $actionName), function($parent, TemplatePaths $paths) use ($controllerName, $actionName, $renderingContext) { return $paths->getTemplateSource($controllerName, $actionName); } ); if ($parsedTemplate->isCompiled()) { $parsedTemplate->addCompiledNamespaces($this->baseRenderingContext); }
$actionName = ucfirst($actionName); $renderingContext->setControllerAction($actionName); } try { $parsedTemplate = $this->getCurrentParsedTemplate(); } catch (PassthroughSourceException $error) { return $error->getSource(); }
$actionResult = $this->{$this->errorMethodName}(); } if ($actionResult === null && $this->view instanceof ViewInterface) { $this->response->appendContent($this->view->render()); } elseif (is_string($actionResult) && $actionResult !== '') { $this->response->appendContent($actionResult); } elseif (is_object($actionResult) && method_exists($actionResult, '__toString')) { $this->response->appendContent((string)$actionResult);
$this->view = $this->resolveView(); if ($this->view !== null) { $this->initializeView($this->view); } $this->callActionMethod(); $this->renderAssetsForRequest($request); } /**
*/ public function processRequest(RequestInterface $request, ResponseInterface $response) { try { parent::processRequest($request, $response); } catch (\Exception $exception) { $this->handleKnownExceptionsElseThrowAgain($exception); } }
throw new \TYPO3\CMS\Extbase\Mvc\Exception\InfiniteLoopException('Could not ultimately dispatch the request after ' . $dispatchLoopCount . ' iterations. Most probably, a @' . \TYPO3\CMS\Extbase\Annotation\IgnoreValidation::class . ' annotation is missing on re-displaying a form with validation errors.', 1217839467); } $controller = $this->resolveController($request); try { $controller->processRequest($request, $response); } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $ignoredException) { } } $this->emitAfterRequestDispatchSignal($request, $response);
} /** @var \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response */ $response = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Web\Response::class); $this->dispatcher->dispatch($request, $response); return $response; } /**
/** @var \TYPO3\CMS\Extbase\Mvc\RequestHandlerResolver $requestHandlerResolver */ $requestHandlerResolver = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\RequestHandlerResolver::class); $requestHandler = $requestHandlerResolver->resolveRequestHandler(); $response = $requestHandler->handleRequest(); // If response is NULL after handling the request we need to stop // This happens for instance, when a USER object was converted to a USER_INT // @see TYPO3\CMS\Extbase\Mvc\Web\FrontendRequestHandler::handleRequest() if ($response === null) {
*/ public function run($content, $configuration) { $this->initialize($configuration); return $this->handleRequest(); } /** * @throws \TYPO3\CMS\Extbase\Mvc\Exception\CommandException Is thrown if the response object defined an exit code > 0
$classObj, $parts[1] ], [ $content, $conf ]); } else { $this->getTimeTracker()->setTSlogMessage('Method "' . $parts[1] . '" did not exist in class "' . $parts[0] . '"', 3); }
if ($this->cObj->getUserObjectType() === false) { // Come here only if we are not called from $TSFE->INTincScript_process()! $this->cObj->setUserObjectType(ContentObjectRenderer::OBJECTTYPE_USER); } $tempContent = $this->cObj->callUserFunction($conf['userFunc'], $conf, ''); if ($this->cObj->doConvertToUserIntObject) { $this->cObj->doConvertToUserIntObject = false; $content = $this->cObj->cObjGetSingle('USER_INT', $conf); } else {
} // Render content try { $content .= $contentObject->render($configuration); } catch (ContentRenderingException $exception) { // Content rendering Exceptions indicate a critical problem which should not be // caught e.g. when something went wrong with Exception handling itself throw $exception;
} if (!$hooked) { $contentObject = $this->getContentObject($name); if ($contentObject) { $content .= $this->render($contentObject, $conf); } else { // Call hook functions for extra processing if ($name) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] ?? [] as $className) {
if ($timeTracker->LR) { $timeTracker->push('/f:cObject/', '<' . $typoscriptObjectPath); } $timeTracker->incStackPointer(); $content = $contentObjectRenderer->cObjGetSingle($setup[$lastSegment], $setup[$lastSegment . '.'] ?? [], $typoscriptObjectPath); $timeTracker->decStackPointer(); if ($timeTracker->LR) { $timeTracker->pull($content); }
'No Content Object definition found at TypoScript object path "' . $typoscriptObjectPath . '"', 1540246570 ); } $content = self::renderContentObject($contentObjectRenderer, $setup, $typoscriptObjectPath, $lastSegment); if (!isset($GLOBALS['TSFE']) || !($GLOBALS['TSFE'] instanceof TypoScriptFrontendController)) { static::resetFrontendEnvironment(); } return $content;
$array5 = array ( );$arguments1['data'] = $renderingContext->getVariableProvider()->getByPath('data', $array5); $arguments1['table'] = 'tt_content'; $renderChildrenClosure2 = ($arguments1['data'] !== null) ? function() use ($arguments1) { return $arguments1['data']; } : $renderChildrenClosure2; $output0 .= TYPO3\CMS\Fluid\ViewHelpers\CObjectViewHelper::renderStatic($arguments1, $renderChildrenClosure2, $renderingContext); $output0 .= ' ';
); } } $this->startRendering($renderingTypeOnNextLevel, $parsedTemplate, $renderingContext); $output = $parsedTemplate->$methodNameOfSection($renderingContext); $this->stopRendering(); } else { $sections = $parsedTemplate->getVariableContainer()->get('1457379500_sections'); if (!isset($sections[$sectionName])) {
$content = (new $delegate())->render($renderingContext); } elseif ($partial !== null) { $content = $view->renderPartial($partial, $section, $variables, $optional); } elseif ($section !== null) { $content = $view->renderSection($section, $variables, $optional); } elseif (!$optional) { throw new \InvalidArgumentException('ViewHelper f:render called without either argument section, partial, renderable or delegate and optional flag is false'); } // Replace empty content with default value. If default is
), $renderingContext ); $output6 .= TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper::renderStatic($arguments48, $renderChildrenClosure49, $renderingContext); $output6 .= ' '; // Rendering ViewHelper TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper
if (isset($arguments['then'])) { return $arguments['then']; } if (isset($arguments['__thenClosure'])) { return $arguments['__thenClosure'](); } } elseif (!empty($arguments['__elseClosures'])) { $elseIfClosures = isset($arguments['__elseifClosures']) ? $arguments['__elseifClosures'] : []; return static::evaluateElseClosures($arguments['__elseClosures'], $elseIfClosures, $renderingContext);
'; return $output68; }; $output3 .= TYPO3Fluid\Fluid\ViewHelpers\IfViewHelper::renderStatic($arguments4, $renderChildrenClosure5, $renderingContext); $output3 .= ' '; return $output3;
* @return string */ public static function renderStatic(array $arguments, \Closure $childClosure, RenderingContextInterface $renderingContext) { return trim(preg_replace('/\\>\\s+\\</', '><', $childClosure())); } }
return $output3; }; $arguments1 = array(); $output0 .= TYPO3Fluid\Fluid\ViewHelpers\SpacelessViewHelper::renderStatic($arguments1, $renderChildrenClosure2, $renderingContext); $output0 .= ' ';
} catch (PassthroughSourceException $error) { return $error->getSource(); } $this->startRendering(self::RENDERING_LAYOUT, $parsedTemplate, $this->baseRenderingContext); $output = $parsedLayout->render($this->baseRenderingContext); $this->stopRendering(); } return $output;
* @return string */ protected function renderFluidView() { return $this->view->render(); } /** * Apply standard wrap to content
$this->view->assignMultiple($variables); $this->renderFluidTemplateAssetsIntoPageRenderer(); $content = $this->renderFluidView(); $content = $this->applyStandardWrapToRenderedContent($content, $conf); $this->view = $parentView; return $content;
} // Render content try { $content .= $contentObject->render($configuration); } catch (ContentRenderingException $exception) { // Content rendering Exceptions indicate a critical problem which should not be // caught e.g. when something went wrong with Exception handling itself throw $exception;
} if (!$hooked) { $contentObject = $this->getContentObject($name); if ($contentObject) { $content .= $this->render($contentObject, $conf); } else { // Call hook functions for extra processing if ($name) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] ?? [] as $className) {
list($name, $conf) = $cF->getVal($key, $this->getTypoScriptFrontendController()->tmpl->setup); $conf = array_replace_recursive(is_array($conf) ? $conf : [], $confOverride); // Getting the cObject $timeTracker->incStackPointer(); $content .= $this->cObjGetSingle($name, $conf, $key); $timeTracker->decStackPointer(); } else { $hooked = false; // Application defined cObjects
// If no "default" property is available, then an empty string is returned if ($key === 'default' && !isset($conf['default'])) { $theValue = ''; } else { $theValue = $this->cObj->cObjGetSingle($conf[$key], $conf[$key . '.'] ?? [], $key); } if (isset($conf['stdWrap.'])) { $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']); }
} // Render content try { $content .= $contentObject->render($configuration); } catch (ContentRenderingException $exception) { // Content rendering Exceptions indicate a critical problem which should not be // caught e.g. when something went wrong with Exception handling itself throw $exception;
} if (!$hooked) { $contentObject = $this->getContentObject($name); if ($contentObject) { $content .= $this->render($contentObject, $conf); } else { // Call hook functions for extra processing if ($name) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] ?? [] as $className) {
list($name, $conf) = $cF->getVal($key, $this->getTypoScriptFrontendController()->tmpl->setup); $conf = array_replace_recursive(is_array($conf) ? $conf : [], $confOverride); // Getting the cObject $timeTracker->incStackPointer(); $content .= $this->cObjGetSingle($name, $conf, $key); $timeTracker->decStackPointer(); } else { $hooked = false; // Application defined cObjects
$cObj->parentRecordNumber = $this->cObj->currentRecordNumber; $GLOBALS['TSFE']->currentRecord = $val['table'] . ':' . $val['id']; $this->cObj->lastChanged($row['tstamp']); $cObj->start($row, $val['table']); $tmpValue = $cObj->cObjGetSingle($renderObjName, $renderObjConf, $renderObjKey); $theValue .= $tmpValue; } } }
} // Render content try { $content .= $contentObject->render($configuration); } catch (ContentRenderingException $exception) { // Content rendering Exceptions indicate a critical problem which should not be // caught e.g. when something went wrong with Exception handling itself throw $exception;
} if (!$hooked) { $contentObject = $this->getContentObject($name); if ($contentObject) { $content .= $this->render($contentObject, $conf); } else { // Call hook functions for extra processing if ($name) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] ?? [] as $className) {
// It's should not be allowed to do this again then!! if (false === empty($parent)) { ++$GLOBALS['TSFE']->recordRegister[$parent]; } $html = $GLOBALS['TSFE']->cObj->cObjGetSingle('RECORDS', $conf); $GLOBALS['TSFE']->currentRecord = $parent; if (false === empty($parent)) { --$GLOBALS['TSFE']->recordRegister[$parent];
$this->contentObject->cObjGetSingle('LOAD_REGISTER', $this->arguments['loadRegister']); } $elements = []; foreach ($rows as $row) { array_push($elements, static::renderRecord($row)); } if (false === empty($this->arguments['loadRegister'])) { $this->contentObject->cObjGetSingle('RESTORE_REGISTER', ''); }
$contentRecords = $this->getSlideRecords($pageUid, $limit); } if (true === (boolean) $this->arguments['render']) { $contentRecords = $this->getRenderedRecords($contentRecords); } return $contentRecords; }
if ('BE' === TYPO3_MODE) { return ''; } $content = $this->getContentRecords(); if (false === $this->hasArgument('as')) { return implode(LF, $content); }
*/ protected function callRenderMethod() { if (method_exists($this, 'render')) { return call_user_func([$this, 'render']); } if ((new \ReflectionMethod($this, 'renderStatic'))->getDeclaringClass()->getName() !== AbstractViewHelper::class) { // Method is safe to call - will not recurse through ViewHelperInvoker via the default // implementation of renderStatic() on this class.
{ $this->validateArguments(); $this->initialize(); return $this->callRenderMethod(); } /** * Call the render() method and handle errors.
} $viewHelper->setRenderingContext($renderingContext); $viewHelper->setArguments($evaluatedArguments); $viewHelper->handleAdditionalArguments($undeclaredArguments); return $viewHelper->initializeArgumentsAndRender(); } catch (Exception $error) { return $renderingContext->getErrorHandler()->handleViewHelperError($error); } }
*/ public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) { $viewHelperClassName = get_called_class(); return $renderingContext->getViewHelperInvoker()->invoke($viewHelperClassName, $arguments, $renderingContext, $renderChildrenClosure); } /** * Save the associated ViewHelper node in a static public class variable.
$arguments29['slideCollectReverse'] = false; $arguments29['as'] = NULL; $arguments29['column'] = 0; $output28 .= FluidTYPO3\Vhs\ViewHelpers\Content\RenderViewHelper::renderStatic($arguments29, $renderChildrenClosure30, $renderingContext); $output28 .= ' <!--TYPO3SEARCH_end--> ';
public function renderChildren() { if ($this->renderChildrenClosure !== null) { $closure = $this->renderChildrenClosure; return $closure(); } return $this->viewHelperNode->evaluateChildNodes($this->renderingContext); }
} $this->templateVariableContainer->add('xlScale', $xlScaleNew); $output = $this->renderChildren(); $GLOBALS['TSFE']->register['xsScale'] = $xsScale; $GLOBALS['TSFE']->register['smScale'] = $smScale; $GLOBALS['TSFE']->register['mdScale'] = $mdScale;
$strClass .= ' ' . $this->arguments['class']; $output = parent::render($xs, $sm, $md, $lg); $tagBuilder = new TagBuilder($this->arguments['tag'] ?? 'div', $output); $tagBuilder->addAttribute('class', $strClass); if ($this->arguments['role'] !== null) {
*/ protected function callRenderMethod() { if (method_exists($this, 'render')) { return call_user_func([$this, 'render']); } if ((new \ReflectionMethod($this, 'renderStatic'))->getDeclaringClass()->getName() !== AbstractViewHelper::class) { // Method is safe to call - will not recurse through ViewHelperInvoker via the default // implementation of renderStatic() on this class.
{ $this->validateArguments(); $this->initialize(); return $this->callRenderMethod(); } /** * Call the render() method and handle errors.
} $viewHelper->setRenderingContext($renderingContext); $viewHelper->setArguments($evaluatedArguments); $viewHelper->handleAdditionalArguments($undeclaredArguments); return $viewHelper->initializeArgumentsAndRender(); } catch (Exception $error) { return $renderingContext->getErrorHandler()->handleViewHelperError($error); } }
*/ public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) { $viewHelperClassName = get_called_class(); return $renderingContext->getViewHelperInvoker()->invoke($viewHelperClassName, $arguments, $renderingContext, $renderChildrenClosure); } /** * Save the associated ViewHelper node in a static public class variable.
$arguments26['role'] = NULL; $arguments26['lg'] = 9; $arguments26['class'] = 'col-main o-1 o-sm-1 o-md-1 o-lg-2'; $output25 .= WapplerSystems\WsT3bootstrap\ViewHelpers\ColumnViewHelper::renderStatic($arguments26, $renderChildrenClosure27, $renderingContext); $output25 .= '
); } } $this->startRendering($renderingTypeOnNextLevel, $parsedTemplate, $renderingContext); $output = $parsedTemplate->$methodNameOfSection($renderingContext); $this->stopRendering(); } else { $sections = $parsedTemplate->getVariableContainer()->get('1457379500_sections'); if (!isset($sections[$sectionName])) {
$content = (new $delegate())->render($renderingContext); } elseif ($partial !== null) { $content = $view->renderPartial($partial, $section, $variables, $optional); } elseif ($section !== null) { $content = $view->renderSection($section, $variables, $optional); } elseif (!$optional) { throw new \InvalidArgumentException('ViewHelper f:render called without either argument section, partial, renderable or delegate and optional flag is false'); } // Replace empty content with default value. If default is
$arguments22['contentAs'] = NULL; $arguments22['debug'] = true; $arguments22['section'] = 'Content'; $output0 .= TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper::renderStatic($arguments22, $renderChildrenClosure23, $renderingContext); $output0 .= ' </main>
} catch (PassthroughSourceException $error) { return $error->getSource(); } $this->startRendering(self::RENDERING_LAYOUT, $parsedTemplate, $this->baseRenderingContext); $output = $parsedLayout->render($this->baseRenderingContext); $this->stopRendering(); } return $output;
); $paths->fillDefaultsByPackageName(GeneralUtility::camelCaseToLowerCaseUnderscored($vendorLessExtensionName)); $paths->setTemplatePathAndFilename($templatePathAndFilename); } $content = $this->view->render(); } else { $foreignControllerClass = $this->configurationService ->getResolver() ->resolveFluxControllerClassNameByExtensionKeyAndControllerName(
$controllerActionName = $this->provider->getControllerActionFromRecord($row); $actualActionName = null !== $requestActionName ? $requestActionName : $controllerActionName; $controllerName = $this->request->getControllerName(); return $this->performSubRendering( $controllerExtensionKey, $controllerName, $actualActionName, $pluginSignature );
} $validationResult = $this->arguments->validate(); if (!$validationResult->hasErrors()) { $this->emitBeforeCallActionMethodSignal($preparedArguments); $actionResult = $this->{$this->actionMethodName}(...$preparedArguments); } else { $actionResult = $this->{$this->errorMethodName}(); }
$this->view = $this->resolveView(); if ($this->view !== null) { $this->initializeView($this->view); } $this->callActionMethod(); $this->renderAssetsForRequest($request); } /**
throw new \TYPO3\CMS\Extbase\Mvc\Exception\InfiniteLoopException('Could not ultimately dispatch the request after ' . $dispatchLoopCount . ' iterations. Most probably, a @' . \TYPO3\CMS\Extbase\Annotation\IgnoreValidation::class . ' annotation is missing on re-displaying a form with validation errors.', 1217839467); } $controller = $this->resolveController($request); try { $controller->processRequest($request, $response); } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $ignoredException) { } } $this->emitAfterRequestDispatchSignal($request, $response);
} /** @var \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response */ $response = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Web\Response::class); $this->dispatcher->dispatch($request, $response); return $response; } /**
/** @var \TYPO3\CMS\Extbase\Mvc\RequestHandlerResolver $requestHandlerResolver */ $requestHandlerResolver = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\RequestHandlerResolver::class); $requestHandler = $requestHandlerResolver->resolveRequestHandler(); $response = $requestHandler->handleRequest(); // If response is NULL after handling the request we need to stop // This happens for instance, when a USER object was converted to a USER_INT // @see TYPO3\CMS\Extbase\Mvc\Web\FrontendRequestHandler::handleRequest() if ($response === null) {
*/ public function run($content, $configuration) { $this->initialize($configuration); return $this->handleRequest(); } /** * @throws \TYPO3\CMS\Extbase\Mvc\Exception\CommandException Is thrown if the response object defined an exit code > 0
$content = $bootstrap->run(null,[ 'extensionName' => 'WsT3bootstrap', 'vendorName' => 'WapplerSystems', 'pluginName' => 'Page', 'variables' => $variables, ]); $content = $this->applyStandardWrapToRenderedContent($content, $conf);
} // Render content try { $content .= $contentObject->render($configuration); } catch (ContentRenderingException $exception) { // Content rendering Exceptions indicate a critical problem which should not be // caught e.g. when something went wrong with Exception handling itself throw $exception;
} if (!$hooked) { $contentObject = $this->getContentObject($name); if ($contentObject) { $content .= $this->render($contentObject, $conf); } else { // Call hook functions for extra processing if ($name) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] ?? [] as $className) {
foreach ($sKeyArray as $theKey) { $theValue = $setup[$theKey]; if ((int)$theKey && strpos($theKey, '.') === false) { $conf = $setup[$theKey . '.']; $content .= $this->cObjGetSingle($theValue, $conf, $addKey . $theKey); } } return $content; }
* @return string */ protected function generatePageContent(TypoScriptFrontendController $controller): string { $pageContent = $controller->cObj->cObjGet($controller->pSetup) ?: ''; if ($controller->pSetup['wrap'] ?? false) { $pageContent = $controller->cObj->wrap($pageContent, $controller->pSetup['wrap']); } if ($controller->pSetup['stdWrap.'] ?? false) {
*/ protected function generatePageContentWithHeader(TypoScriptFrontendController $controller, ?SiteLanguage $siteLanguage): string { // Generate the page content, this has to be first, as some additional TSFE-related code could have been written $pageContent = $this->generatePageContent($controller); $pageRenderer = $this->getPageRenderer(); if ($controller->config['config']['moveJsFromHeaderToFooter'] ?? false) { $pageRenderer->enableMoveJsFromHeaderToFooter(); }
// If 'disableAllHeaderCode' is set, all the header-code is discarded if ($controller->config['config']['disableAllHeaderCode'] ?? false) { $controller->content = $this->generatePageContent($controller); } else { $controller->content = $this->generatePageContentWithHeader($controller, $request->getAttribute('language', null)); } $this->timeTracker->pull($this->timeTracker->LR ? $controller->content : ''); $this->timeTracker->decStackPointer();
// Throw away all output that may have happened during bootstrapping by weird extensions ob_clean(); // Initialize output compression if configured $this->initializeOutputCompression(); return $handler->handle($request); } /** * Initialize output compression if configured
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
} } } } return $handler->handle($request); } /** * Returns TRUE if an edit-action is sent from the Admin Panel
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
* @return ResponseInterface */ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $response = $handler->handle($request); if ( !($response instanceof NullResponse) && $GLOBALS['TSFE'] instanceof TypoScriptFrontendController && $GLOBALS['TSFE']->isOutputting()
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
* @return ResponseInterface */ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $response = $handler->handle($request); if ( !($response instanceof NullResponse) && $GLOBALS['TSFE'] instanceof TypoScriptFrontendController && $GLOBALS['TSFE']->isOutputting()
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
* @return ResponseInterface */ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $response = $handler->handle($request); if ( !($response instanceof NullResponse) && $GLOBALS['TSFE'] instanceof TypoScriptFrontendController && $GLOBALS['TSFE']->isOutputting()) {
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
return new RedirectResponse($externalUrl, 303); } } return $handler->handle($request); } protected function getRedirectUri(ServerRequestInterface $request): ?string {
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
GeneralUtility::makeInstance($className)->checkDataSubmission($this->controller); } } return $handler->handle($request); } /** * Small helper function to convert charsets for arrays to UTF-8
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
['code' => PageAccessFailureReasons::CACHEHASH_COMPARISON_FAILED] ); } } return $handler->handle($request); } /** * Calculates a hash string based on additional parameters in the url.
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
) { return GeneralUtility::makeInstance(ErrorController::class)->unavailableAction($request, 'This page is temporarily unavailable.'); } // Continue the regular stack if no maintenance mode is active return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
} $this->controller->determineId(); } return $handler->handle($request); } /** * Provides ways to bypass the '?id=[xxx]&type=[xx]' format, using either PATH_INFO or Server Rewrites
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
// Caching is disabled, because otherwise generated URLs could include the ADMCMD_noBeUser parameter $GLOBALS['TSFE']->set_no_cache('GET Parameter ADMCMD_noBeUser was given', true); } $response = $handler->handle($request); // Add a info box to the frontend content if ($GLOBALS['TSFE']->doWorkspacePreview() && $GLOBALS['TSFE']->isOutputting()) { $previewInfo = $this->renderPreviewInfo($GLOBALS['TSFE'], $request->getAttribute('normalizedParams'));
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$showHiddenRecords = ($this->context->hasAspect('visibility') ? $this->context->getAspect('visibility')->includeHidden() : false); $GLOBALS['TSFE']->fePreview = ($simulatingDate || $simulatingGroup || $showHiddenRecords); } return $handler->handle($request); } /** * Simulate dates for preview functionality
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
return $response; } } return $handler->handle($request); } /** * Creates a PSR-7 compatible Response object
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
return new HtmlResponse($content, 200, ['Content-Type' => $contentType]); } } return $handler->handle($request); } /** * Find the proper configuration for the static route in the static route configuration. Mainly:
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$uri = $requestedUri->withPath(rtrim($requestedUri->getPath(), '/')); return new RedirectResponse($uri, 307); } } return $handler->handle($request); } /** * Checks if the language is allowed in Frontend, if not, check if there is valid BE user *
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$beUser = $GLOBALS['BE_USER']; $beUser->adminPanel = GeneralUtility::makeInstance(AdminPanelView::class); $beUser->extAdmEnabled = true; } return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
// At this point, we later get further route modifiers // for bw-compat we update $GLOBALS[TYPO3_REQUEST] to be used later in TSFE. $GLOBALS['TYPO3_REQUEST'] = $request; return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class); $connection = $connectionPool->getConnectionByName(ConnectionPool::DEFAULT_CONNECTION_NAME); $connection->getConfiguration()->setSQLLogger(GeneralUtility::makeInstance(DoctrineSqlLogger::class)); } return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
Bootstrap::loadExtTables(); $this->setBackendUserAspect(GeneralUtility::makeInstance(Context::class), $GLOBALS['BE_USER']); } return $handler->handle($request); } /** * Creates the backend user object and returns it.
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
// Register the frontend user as aspect $this->setFrontendUserAspect(GeneralUtility::makeInstance(Context::class), $frontendUser); return $handler->handle($request); } /** * It's possible to transfer a frontend user session via a GET/POST parameter 'FE_SESSION_KEY'.
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
GeneralUtility::callUserFunction($_funcRef, $_params, $GLOBALS['TSFE']); } } return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
{ $eID = $request->getParsedBody()['eID'] ?? $request->getQueryParams()['eID'] ?? null; if ($eID === null) { return $handler->handle($request); } // Remove any output produced until now ob_clean();
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
$hookParameters = []; GeneralUtility::callUserFunction($hookFunction, $hookParameters, $hookParameters); } } return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
// refactored to have ServerRequest object available where it is needed. This global will be // deprecated then and removed. $GLOBALS['TYPO3_REQUEST'] = $request; return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
); $timeTracker->start(); $timeTracker->push(''); return $handler->handle($request); } }
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
* @return ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface { return $this->tip->handle($request); } /** * Seed the middleware stack with the inner request handler
{ $requestHandler = GeneralUtility::makeInstance($this->requestHandler); $dispatcher = $this->createMiddlewareDispatcher($requestHandler); return $dispatcher->handle($request); } /** * Set up the application and shut it down afterwards
if (!$this->checkIfEssentialConfigurationExists()) { return $this->installToolRedirect(); } $this->initializeContext(); return parent::handle($request); } /** * Check if LocalConfiguration.php and PackageStates.php exist
final public function run(callable $execute = null) { try { $response = $this->handle( \TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals() ); if ($execute !== null) { call_user_func($execute); }
// Set up the application for the frontend call_user_func(function () { $classLoader = require __DIR__.'/vendor/autoload.php'; \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE); \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Frontend\Http\Application::class)->run(); });
call_user_func(function () { $classLoader = require __DIR__.'/vendor/autoload.php'; \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE); \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Frontend\Http\Application::class)->run(); });