/var
/www
/clients
/client58
/web182
/web
/typo3conf
/ext
/dated_news
/Classes
/Controller
/NewsController.php
/**
* Single view of a news record.
*
* @param \GeorgRinger\News\Domain\Model\News $news news item
* @param int $currentPage current page for optional pagination
* @param \FalkRoeder\DatedNews\Domain\Model\Application $newApplication
*
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentException
*/
public function eventDetailAction(\GeorgRinger\News\Domain\Model\News $news = null, $currentPage = 1, \FalkRoeder\DatedNews\Domain\Model\Application $newApplication = null)
{
$news = $this->getNewsOrPreviewNews($news);
$demand = $this->createDemandObjectFromSettings($this->settings);
$demand->setActionAndClass(__METHOD__, __CLASS__);
$this->addCalendarCss($this->settings['dated_news']['cssFile']);
if ($news->getRecurrence() > 0) {
$recurrences = $news->getNewsRecurrence()->toArray();
$recurrenceOptions = [];
foreach ($recurrences as $recurrence) {
//options for reservable recurrences
if ($recurrence->getSlotsFree() > 0) {
$recurrenceOption = new \stdClass();
$recurrenceOption->key = $recurrence->getUid();
$recurrenceOption->value = $recurrence->getEventstart()->format($this->settings['dated_news']['emailSubjectDateFormat']);
$recurrenceOptions[] = $recurrenceOption;
}
}
} else {
$slotoptions = $news->getSlotoptions();
}
$assignedValues = [
'newsItem' => $news,
'currentPage' => (int) $currentPage,
'demand' => $demand,
'newApplication' => $newApplication,
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/extbase
/Classes
/Mvc
/Controller
/ActionController.php
/**
* Calls the specified action method and passes the arguments.
*
* If the action returns a string, it is appended to the content in the
* response object. If the action doesn't return anything and a valid
* view exists, the view is rendered automatically.
*
* @api
*/
protected function callActionMethod()
{
$preparedArguments = [];
/** @var \TYPO3\CMS\Extbase\Mvc\Controller\Argument $argument */
foreach ($this->arguments as $argument) {
$preparedArguments[] = $argument->getValue();
}
$validationResult = $this->arguments->getValidationResults();
if (!$validationResult->hasErrors()) {
$this->emitBeforeCallActionMethodSignal($preparedArguments);
$actionResult = call_user_func_array([$this, $this->actionMethodName], $preparedArguments);
} else {
$methodTagsValues = $this->reflectionService->getMethodTagsValues(get_class($this), $this->actionMethodName);
$ignoreValidationAnnotations = [];
if (isset($methodTagsValues['ignorevalidation'])) {
$ignoreValidationAnnotations = $methodTagsValues['ignorevalidation'];
}
// if there exist errors which are not ignored with @ignorevalidation => call error method
// else => call action method
$shouldCallActionMethod = true;
foreach ($validationResult->getSubResults() as $argumentName => $subValidationResult) {
if (!$subValidationResult->hasErrors()) {
continue;
}
if (array_search('$' . $argumentName, $ignoreValidationAnnotations) !== false) {
continue;
}
$shouldCallActionMethod = false;
break;
}
if ($shouldCallActionMethod) {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/extbase
/Classes
/Mvc
/Controller
/ActionController.php
/**
* Calls the specified action method and passes the arguments.
*
* If the action returns a string, it is appended to the content in the
* response object. If the action doesn't return anything and a valid
* view exists, the view is rendered automatically.
*
* @api
*/
protected function callActionMethod()
{
$preparedArguments = [];
/** @var \TYPO3\CMS\Extbase\Mvc\Controller\Argument $argument */
foreach ($this->arguments as $argument) {
$preparedArguments[] = $argument->getValue();
}
$validationResult = $this->arguments->getValidationResults();
if (!$validationResult->hasErrors()) {
$this->emitBeforeCallActionMethodSignal($preparedArguments);
$actionResult = call_user_func_array([$this, $this->actionMethodName], $preparedArguments);
} else {
$methodTagsValues = $this->reflectionService->getMethodTagsValues(get_class($this), $this->actionMethodName);
$ignoreValidationAnnotations = [];
if (isset($methodTagsValues['ignorevalidation'])) {
$ignoreValidationAnnotations = $methodTagsValues['ignorevalidation'];
}
// if there exist errors which are not ignored with @ignorevalidation => call error method
// else => call action method
$shouldCallActionMethod = true;
foreach ($validationResult->getSubResults() as $argumentName => $subValidationResult) {
if (!$subValidationResult->hasErrors()) {
continue;
}
if (array_search('$' . $argumentName, $ignoreValidationAnnotations) !== false) {
continue;
}
$shouldCallActionMethod = false;
break;
}
if ($shouldCallActionMethod) {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/extbase
/Classes
/Mvc
/Controller
/ActionController.php
$this->request->setDispatched(true);
$this->response = $response;
$this->uriBuilder = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class);
$this->uriBuilder->setRequest($request);
$this->actionMethodName = $this->resolveActionMethodName();
$this->initializeActionMethodArguments();
$this->initializeActionMethodValidators();
$this->mvcPropertyMappingConfigurationService->initializePropertyMappingConfigurationFromRequest($request, $this->arguments);
$this->initializeAction();
$actionInitializationMethodName = 'initialize' . ucfirst($this->actionMethodName);
if (method_exists($this, $actionInitializationMethodName)) {
call_user_func([$this, $actionInitializationMethodName]);
}
$this->mapRequestArgumentsToControllerArguments();
$this->controllerContext = $this->buildControllerContext();
$this->view = $this->resolveView();
if ($this->view !== null) {
$this->initializeView($this->view);
}
$this->callActionMethod();
$this->renderAssetsForRequest($request);
}
/**
* Method which initializes assets that should be attached to the response
* for the given $request, which contains parameters that an override can
* use to determine which assets to add via PageRenderer.
*
* This default implementation will attempt to render the sections "HeaderAssets"
* and "FooterAssets" from the template that is being rendered, inserting the
* rendered content into either page header or footer, as appropriate. Both
* sections are optional and can be used one or both in combination.
*
* You can add assets with this method without worrying about duplicates, if
* for example you do this in a plugin that gets used multiple time on a page.
*
* @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request
*/
protected function renderAssetsForRequest($request)
{
/var
/www
/clients
/client58
/web182
/web
/typo3conf
/ext
/news
/Classes
/Controller
/NewsBaseController.php
* or prepare the view in another way before the action is called.
*
* @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view The view to be initialized
*/
protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
{
$view->assign('contentObjectData', $this->configurationManager->getContentObject()->data);
$view->assign('emConfiguration', EmConfiguration::getSettings());
parent::initializeView($view);
}
/**
* @param RequestInterface $request
* @param ResponseInterface $response
* @throws \Exception
*/
public function processRequest(RequestInterface $request, ResponseInterface $response)
{
try {
parent::processRequest($request, $response);
} catch (\Exception $exception) {
$this->handleKnownExceptionsElseThrowAgain($exception);
}
}
/**
* @param \Exception $exception
* @throws \Exception
*/
private function handleKnownExceptionsElseThrowAgain(\Exception $exception)
{
$previousException = $exception->getPrevious();
if (
$this->actionMethodName === 'detailAction'
&& $previousException instanceof \TYPO3\CMS\Extbase\Property\Exception
&& isset($this->settings['detail']['errorHandling'])
) {
$this->handleNoNewsFoundError($this->settings['detail']['errorHandling']);
} else {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/extbase
/Classes
/Mvc
/Dispatcher.php
$this->objectManager = $objectManager;
}
/**
* Dispatches a request to a controller and initializes the security framework.
*
* @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request The request to dispatch
* @param \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response The response, to be modified by the controller
* @throws Exception\InfiniteLoopException
*/
public function dispatch(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
{
$dispatchLoopCount = 0;
while (!$request->isDispatched()) {
if ($dispatchLoopCount++ > 99) {
throw new \TYPO3\CMS\Extbase\Mvc\Exception\InfiniteLoopException('Could not ultimately dispatch the request after ' . $dispatchLoopCount . ' iterations. Most probably, a @ignorevalidation 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);
}
/**
* Emits a signal after a request was dispatched
*
* @param RequestInterface $request
* @param ResponseInterface $response
*/
protected function emitAfterRequestDispatchSignal(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
{
$this->signalSlotDispatcher->dispatch(__CLASS__, 'afterRequestDispatch', [$request, $response]);
}
/**
* Finds and instanciates a controller that matches the current request.
* If no controller can be found, an instance of NotFoundControllerInterface is returned.
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/extbase
/Classes
/Mvc
/Web
/FrontendRequestHandler.php
$contentObject = $this->configurationManager->getContentObject();
if ($contentObject->getUserObjectType() === \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::OBJECTTYPE_USER) {
$contentObject->convertToUserIntObject();
// \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::convertToUserIntObject() will recreate the object, so we have to stop the request here
return null;
}
$request->setIsCached(false);
}
if ($this->configurationManager->isFeatureEnabled('requireCHashArgumentForActionArguments')) {
$pluginNamespace = $this->extensionService->getPluginNamespace(
$request->getControllerExtensionName(),
$request->getPluginName()
);
$this->cacheHashEnforcer->enforceForRequest($request, $pluginNamespace);
}
/** @var $response \TYPO3\CMS\Extbase\Mvc\ResponseInterface */
$response = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Web\Response::class);
$this->dispatcher->dispatch($request, $response);
return $response;
}
/**
* This request handler can handle any web request.
*
* @return bool If the request is a web request, TRUE otherwise FALSE
*/
public function canHandleRequest()
{
return $this->environmentService->isEnvironmentInFrontendMode();
}
}
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/extbase
/Classes
/Core
/Bootstrap.php
* @return string $content The processed content
* @api
*/
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
* @return string
*/
protected function handleRequest()
{
/** @var $requestHandlerResolver \TYPO3\CMS\Extbase\Mvc\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) {
$this->reflectionService->shutdown();
$content = '';
} else {
$content = $response->shutdown();
$this->resetSingletons();
$this->objectManager->get(\TYPO3\CMS\Extbase\Service\CacheService::class)->clearCachesOfRegisteredPageIds();
if ($this->isInCliMode() && $response->getExitCode()) {
throw new \TYPO3\CMS\Extbase\Mvc\Exception\CommandException('The request has been terminated as the response defined an exit code.', $response->getExitCode());
}
}
return $content;
}
/**
* Resets global singletons for the next plugin
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/extbase
/Classes
/Core
/Bootstrap.php
* @see initialize()
*/
public function initializePersistence()
{
$this->persistenceManager = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class);
}
/**
* Runs the the Extbase Framework by resolving an appropriate Request Handler and passing control to it.
* If the Framework is not initialized yet, it will be initialized.
*
* @param string $content The content. Not used
* @param array $configuration The TS configuration array
* @return string $content The processed content
* @api
*/
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
* @return string
*/
protected function handleRequest()
{
/** @var $requestHandlerResolver \TYPO3\CMS\Extbase\Mvc\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) {
$this->reflectionService->shutdown();
$content = '';
} else {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
* @param string $content The content string to pass the function
* @return string The return content from the function call. Should probably be a string.
* @see USER(), stdWrap(), typoLink(), _parseFunc()
*/
public function callUserFunction($funcName, $conf, $content)
{
// Split parts
$parts = explode('->', $funcName);
if (count($parts) === 2) {
// Check whether PHP class is available
if (class_exists($parts[0])) {
$classObj = GeneralUtility::makeInstance($parts[0]);
if (is_object($classObj) && method_exists($classObj, $parts[1])) {
$classObj->cObj = $this;
$content = call_user_func_array([
$classObj,
$parts[1]
], [
$content,
$conf
]);
} else {
$this->getTimeTracker()->setTSlogMessage('Method "' . $parts[1] . '" did not exist in class "' . $parts[0] . '"', 3);
}
} else {
$this->getTimeTracker()->setTSlogMessage('Class "' . $parts[0] . '" did not exist', 3);
}
} elseif (function_exists($funcName)) {
$content = call_user_func($funcName, $content, $conf);
} else {
$this->getTimeTracker()->setTSlogMessage('Function "' . $funcName . '" did not exist', 3);
}
return $content;
}
/**
* Parses a set of text lines with "[parameters] = [values]" into an array with parameters as keys containing the value
* If lines are empty or begins with "/" or "#" then they are ignored.
*
* @param string $params Text which the parameters
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
* @param string $content The content string to pass the function
* @return string The return content from the function call. Should probably be a string.
* @see USER(), stdWrap(), typoLink(), _parseFunc()
*/
public function callUserFunction($funcName, $conf, $content)
{
// Split parts
$parts = explode('->', $funcName);
if (count($parts) === 2) {
// Check whether PHP class is available
if (class_exists($parts[0])) {
$classObj = GeneralUtility::makeInstance($parts[0]);
if (is_object($classObj) && method_exists($classObj, $parts[1])) {
$classObj->cObj = $this;
$content = call_user_func_array([
$classObj,
$parts[1]
], [
$content,
$conf
]);
} else {
$this->getTimeTracker()->setTSlogMessage('Method "' . $parts[1] . '" did not exist in class "' . $parts[0] . '"', 3);
}
} else {
$this->getTimeTracker()->setTSlogMessage('Class "' . $parts[0] . '" did not exist', 3);
}
} elseif (function_exists($funcName)) {
$content = call_user_func($funcName, $content, $conf);
} else {
$this->getTimeTracker()->setTSlogMessage('Function "' . $funcName . '" did not exist', 3);
}
return $content;
}
/**
* Parses a set of text lines with "[parameters] = [values]" into an array with parameters as keys containing the value
* If lines are empty or begins with "/" or "#" then they are ignored.
*
* @param string $params Text which the parameters
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/UserContentObject.php
class UserContentObject extends AbstractContentObject
{
/**
* Rendering the cObject, USER
*
* @param array $conf Array of TypoScript properties
* @return string Output
*/
public function render($conf = [])
{
if (!is_array($conf) || empty($conf)) {
$this->getTimeTracker()->setTSlogMessage('USER without configuration.', 2);
return '';
}
$content = '';
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 {
$content .= $tempContent;
}
if (isset($conf['stdWrap.'])) {
$content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
}
$this->cObj->setUserObjectType(false);
return $content;
}
/**
* @return TimeTracker
*/
protected function getTimeTracker()
{
return GeneralUtility::makeInstance(TimeTracker::class);
}
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
* @throws \Exception
* @return string
*/
public function render(AbstractContentObject $contentObject, $configuration = [])
{
$content = '';
// Evaluate possible cache and return
$cacheConfiguration = isset($configuration['cache.']) ? $configuration['cache.'] : null;
if ($cacheConfiguration !== null) {
unset($configuration['cache.']);
$cache = $this->getFromCache($cacheConfiguration);
if ($cache !== false) {
return $cache;
}
}
// 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;
} catch (\Exception $exception) {
$exceptionHandler = $this->createExceptionHandler($configuration);
if ($exceptionHandler === null) {
throw $exception;
}
$content = $exceptionHandler->handle($exception, $contentObject, $configuration);
}
// Store cache
if ($cacheConfiguration !== null) {
$key = $this->calculateCacheKey($cacheConfiguration);
if (!empty($key)) {
/** @var $cacheFrontend \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend */
$cacheFrontend = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_hash');
$tags = $this->calculateCacheTags($cacheConfiguration);
$lifetime = $this->calculateCacheLifetime($cacheConfiguration);
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
$timeTracker->incStackPointer();
$content .= $this->cObjGetSingle($name, $conf, $key);
$timeTracker->decStackPointer();
} else {
$hooked = false;
// Application defined cObjects
if (!empty($this->cObjHookObjectsRegistry[$name])) {
if (empty($this->cObjHookObjectsArr[$name])) {
$this->cObjHookObjectsArr[$name] = GeneralUtility::getUserObj($this->cObjHookObjectsRegistry[$name]);
}
$hookObj = $this->cObjHookObjectsArr[$name];
if (method_exists($hookObj, 'cObjGetSingleExt')) {
$content .= $hookObj->cObjGetSingleExt($name, $conf, $TSkey, $this);
$hooked = true;
}
}
if (!$hooked) {
$contentObject = $this->getContentObject($name);
if ($contentObject) {
$content .= $this->render($contentObject, $conf);
} else {
// Call hook functions for extra processing
if ($name && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] as $classData) {
$hookObject = GeneralUtility::getUserObj($classData);
if (!$hookObject instanceof ContentObjectGetSingleHookInterface) {
throw new \UnexpectedValueException('$hookObject must implement interface ' . ContentObjectGetSingleHookInterface::class, 1195043731);
}
/** @var $hookObject ContentObjectGetSingleHookInterface */
$content .= $hookObject->getSingleContentObject($name, (array)$conf, $TSkey, $this);
}
} else {
// Log error in AdminPanel
$warning = sprintf('Content Object "%s" does not exist', $name);
$timeTracker->setTSlogMessage($warning, 2);
}
}
}
}
if ($timeTracker->LR) {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/fluid
/Classes
/ViewHelpers
/CObjectViewHelper.php
} elseif (is_string($data) || is_numeric($data)) {
$currentValue = (string)$data;
$data = [$data];
}
$this->contentObjectRenderer->start($data, $table);
if ($currentValue !== null) {
$this->contentObjectRenderer->setCurrentVal($currentValue);
} elseif ($currentValueKey !== null && isset($data[$currentValueKey])) {
$this->contentObjectRenderer->setCurrentVal($data[$currentValueKey]);
}
$pathSegments = GeneralUtility::trimExplode('.', $typoscriptObjectPath);
$lastSegment = array_pop($pathSegments);
$setup = $this->typoScriptSetup;
foreach ($pathSegments as $segment) {
if (!array_key_exists(($segment . '.'), $setup)) {
throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('TypoScript object path "' . htmlspecialchars($typoscriptObjectPath) . '" does not exist', 1253191023);
}
$setup = $setup[$segment . '.'];
}
$content = $this->contentObjectRenderer->cObjGetSingle($setup[$lastSegment], $setup[$lastSegment . '.']);
if (TYPO3_MODE === 'BE') {
$this->resetFrontendEnvironment();
}
return $content;
}
/**
* Sets the $TSFE->cObjectDepthCounter in Backend mode
* This somewhat hacky work around is currently needed because the cObjGetSingle() function of \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer relies on this setting
*/
protected function simulateFrontendEnvironment()
{
$this->tsfeBackup = isset($GLOBALS['TSFE']) ? $GLOBALS['TSFE'] : null;
$GLOBALS['TSFE'] = new \stdClass();
$GLOBALS['TSFE']->cObjectDepthCounter = 100;
}
/**
* Resets $GLOBALS['TSFE'] if it was previously changed by simulateFrontendEnvironment()
*
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/fluid
/Classes
/Core
/ViewHelper
/AbstractViewHelper.php
$this->reflectionService = $reflectionService;
}
/**
* Call the render() method and handle errors.
*
* @return string the rendered ViewHelper
* @throws Exception
*/
protected function callRenderMethod()
{
$renderMethodParameters = [];
foreach ($this->argumentDefinitions as $argumentName => $argumentDefinition) {
if ($argumentDefinition instanceof \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition && $argumentDefinition->isMethodParameter()) {
$renderMethodParameters[$argumentName] = $this->arguments[$argumentName];
}
}
try {
return call_user_func_array([$this, 'render'], $renderMethodParameters);
} catch (Exception $exception) {
if (GeneralUtility::getApplicationContext()->isProduction()) {
$this->getLogger()->error('A Fluid ViewHelper Exception was captured: ' . $exception->getMessage() . ' (' . $exception->getCode() . ')', ['exception' => $exception]);
return '';
}
throw $exception;
}
}
/**
* @return LoggerInterface
*/
protected function getLogger()
{
return GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);
}
/**
* Register method arguments for "render" by analysing the doc comment above.
*
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/fluid
/Classes
/Core
/ViewHelper
/AbstractViewHelper.php
$this->reflectionService = $reflectionService;
}
/**
* Call the render() method and handle errors.
*
* @return string the rendered ViewHelper
* @throws Exception
*/
protected function callRenderMethod()
{
$renderMethodParameters = [];
foreach ($this->argumentDefinitions as $argumentName => $argumentDefinition) {
if ($argumentDefinition instanceof \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition && $argumentDefinition->isMethodParameter()) {
$renderMethodParameters[$argumentName] = $this->arguments[$argumentName];
}
}
try {
return call_user_func_array([$this, 'render'], $renderMethodParameters);
} catch (Exception $exception) {
if (GeneralUtility::getApplicationContext()->isProduction()) {
$this->getLogger()->error('A Fluid ViewHelper Exception was captured: ' . $exception->getMessage() . ' (' . $exception->getCode() . ')', ['exception' => $exception]);
return '';
}
throw $exception;
}
}
/**
* @return LoggerInterface
*/
protected function getLogger()
{
return GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);
}
/**
* Register method arguments for "render" by analysing the doc comment above.
*
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/vendor
/typo3fluid
/fluid
/src
/Core
/ViewHelper
/AbstractViewHelper.php
*
* @param \Closure $renderChildrenClosure
* @return void
*/
public function setRenderChildrenClosure(\Closure $renderChildrenClosure)
{
$this->renderChildrenClosure = $renderChildrenClosure;
}
/**
* Initialize the arguments of the ViewHelper, and call the render() method of the ViewHelper.
*
* @return string the rendered ViewHelper.
*/
public function initializeArgumentsAndRender()
{
$this->validateArguments();
$this->initialize();
return $this->callRenderMethod();
}
/**
* Call the render() method and handle errors.
*
* @return string the rendered ViewHelper
* @throws Exception
*/
protected function callRenderMethod()
{
return call_user_func([$this, 'render']);
}
/**
* Initializes the view helper before invoking the render method.
*
* Override this method to solve tasks before the view helper content is rendered.
*
* @return void
* @api
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/vendor
/typo3fluid
/fluid
/src
/Core
/ViewHelper
/ViewHelperInvoker.php
/** @var NodeInterface|mixed $argumentValue */
$argumentValue = $arguments[$argumentName];
$evaluatedArguments[$argumentName] = $argumentValue instanceof NodeInterface ? $argumentValue->evaluate($renderingContext) : $argumentValue;
} else {
$evaluatedArguments[$argumentName] = $argumentDefinition->getDefaultValue();
}
}
foreach ($arguments as $argumentName => $argumentValue) {
if (!array_key_exists($argumentName, $evaluatedArguments)) {
$undeclaredArguments[$argumentName] = $argumentValue instanceof NodeInterface ? $argumentValue->evaluate($renderingContext) : $argumentValue;
}
}
if ($renderChildrenClosure) {
$viewHelper->setRenderChildrenClosure($renderChildrenClosure);
}
$viewHelper->setRenderingContext($renderingContext);
$viewHelper->setArguments($evaluatedArguments);
$viewHelper->handleAdditionalArguments($undeclaredArguments);
return $viewHelper->initializeArgumentsAndRender();
} catch (Exception $error) {
return $renderingContext->getErrorHandler()->handleViewHelperError($error);
}
}
}
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/vendor
/typo3fluid
/fluid
/src
/Core
/ViewHelper
/AbstractViewHelper.php
get_class($this),
$argumentsName,
$closureName
);
}
/**
* Default implementation of static rendering; useful API method if your ViewHelper
* when compiled is able to render itself statically to increase performance. This
* default implementation will simply delegate to the ViewHelperInvoker.
*
* @param array $arguments
* @param \Closure $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
* @return mixed
*/
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.
* called directly after the ViewHelper was built.
*
* @param ViewHelperNode $node
* @param TextNode[] $arguments
* @param VariableProviderInterface $variableContainer
* @return void
*/
public static function postParseEvent(ViewHelperNode $node, array $arguments, VariableProviderInterface $variableContainer)
{
}
/**
* Resets the ViewHelper state.
*
* Overwrite this method if you need to get a clean state of your ViewHelper.
*
/var
/www
/clients
/client58
/web182
/web
/typo3temp
/var
/Cache
/Code
/fluid_template
/Standard_action_List_c41a7bb08b1f4dfe503c9b35cb8bb47266e812c8.php
$renderChildrenClosure2 = function() use ($renderingContext, $self) {
return NULL;
};
$arguments1 = array();
$arguments1['typoscriptObjectPath'] = NULL;
$arguments1['data'] = NULL;
$arguments1['currentValueKey'] = NULL;
$arguments1['table'] = '';
$output3 = '';
$output3 .= 'tt_content.list.20.';
$array4 = array (
);
$output3 .= $renderingContext->getVariableProvider()->getByPath('data.list_type', $array4);
$arguments1['typoscriptObjectPath'] = $output3;
$array5 = array (
);$arguments1['data'] = $renderingContext->getVariableProvider()->getByPath('data', $array5);
$arguments1['table'] = 'tt_content';
$output0 .= TYPO3\CMS\Fluid\ViewHelpers\CObjectViewHelper::renderStatic($arguments1, $renderChildrenClosure2, $renderingContext);
$output0 .= '
';
return $output0;
}
/**
* Main Render function
*/
public function render(\TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $renderingContext) {
$self = $this;
$output6 = '';
$output6 .= '
';
// Rendering ViewHelper TYPO3Fluid\Fluid\ViewHelpers\LayoutViewHelper
$renderChildrenClosure8 = function() use ($renderingContext, $self) {
return NULL;
};
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/vendor
/typo3fluid
/fluid
/src
/View
/AbstractTemplateView.php
$parsedTemplate = $this->getCurrentParsedTemplate();
} catch (PassthroughSourceException $error) {
return $error->getSource();
} catch (Exception $error) {
return $renderingContext->getErrorHandler()->handleViewError($error);
}
if ($parsedTemplate->isCompiled()) {
$methodNameOfSection = 'section_' . sha1($sectionName);
if (!method_exists($parsedTemplate, $methodNameOfSection)) {
if ($ignoreUnknown) {
return '';
} else {
return $renderingContext->getErrorHandler()->handleViewError(
new InvalidSectionException('Section "' . $sectionName . '" does not exist.')
);
}
}
$this->startRendering($renderingTypeOnNextLevel, $parsedTemplate, $renderingContext);
$output = $parsedTemplate->$methodNameOfSection($renderingContext);
$this->stopRendering();
} else {
$sections = $parsedTemplate->getVariableContainer()->get('1457379500_sections');
if (!isset($sections[$sectionName])) {
if ($ignoreUnknown) {
return '';
}
return $renderingContext->getErrorHandler()->handleViewError(
new InvalidSectionException('Section "' . $sectionName . '" does not exist.')
);
}
/** @var $section ViewHelperNode */
$section = $sections[$sectionName];
$renderingContext->getViewHelperVariableContainer()->add(
SectionViewHelper::class,
'isCurrentlyRenderingSection',
true
);
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/vendor
/typo3fluid
/fluid
/src
/ViewHelpers
/RenderViewHelper.php
$tagContent = $renderChildrenClosure();
if ($arguments['contentAs']) {
$variables[$arguments['contentAs']] = $tagContent;
}
$view = $renderingContext->getViewHelperVariableContainer()->getView();
$content = '';
if ($renderable) {
$content = $renderable->render($renderingContext);
} elseif ($delegate !== null) {
if (!is_a($delegate, ParsedTemplateInterface::class, true)) {
throw new \InvalidArgumentException(sprintf('Cannot render %s - must implement ParsedTemplateInterface!', $delegate));
}
$renderingContext = clone $renderingContext;
$renderingContext->getVariableProvider()->setSource($variables);
$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
// not set, NULL is returned and cast to a new, empty string
// outside of this ViewHelper.
if ($content === '') {
$content = $arguments['default'] ?: $tagContent;
}
return $content;
}
}
/var
/www
/clients
/client58
/web182
/web
/typo3temp
/var
/Cache
/Code
/fluid_template
/layout_Default_html_db3c6ef1238f3be810319586e5f08d8ab0b85085.php
$arguments168['arguments'] = array (
);
$arguments168['optional'] = false;
$arguments168['default'] = NULL;
$arguments168['contentAs'] = NULL;
$arguments168['section'] = 'Main';
// Rendering Boolean node
// Rendering Array
$array170 = array();
$array170['0'] = 'true';
$expression171 = function($context) {return TRUE;};
$arguments168['optional'] = TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\BooleanNode::convertToBoolean(
$expression171(
TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\BooleanNode::gatherContext($renderingContext, $array170)
),
$renderingContext
);
$output95 .= TYPO3Fluid\Fluid\ViewHelpers\RenderViewHelper::renderStatic($arguments168, $renderChildrenClosure169, $renderingContext);
$output95 .= '
';
// Rendering ViewHelper TYPO3Fluid\Fluid\ViewHelpers\RenderViewHelper
$renderChildrenClosure173 = function() use ($renderingContext, $self) {
$output176 = '';
$output176 .= '
';
// Rendering ViewHelper TYPO3Fluid\Fluid\ViewHelpers\RenderViewHelper
$renderChildrenClosure178 = function() use ($renderingContext, $self) {
return NULL;
};
$arguments177 = array();
$arguments177['section'] = NULL;
$arguments177['partial'] = NULL;
$arguments177['delegate'] = NULL;
$arguments177['renderable'] = NULL;
$arguments177['arguments'] = array (
);
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/vendor
/typo3fluid
/fluid
/src
/Core
/ViewHelper
/AbstractConditionViewHelper.php
*/
protected static function evaluateCondition($arguments = null)
{
return (boolean) $arguments['condition'];
}
/**
* @param array $arguments
* @param \Closure $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
* @return mixed
*/
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
{
if (static::evaluateCondition($arguments)) {
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);
} elseif (array_key_exists('else', $arguments)) {
return $arguments['else'];
}
return '';
}
/**
* @param array $closures
* @param array $conditionClosures
* @param RenderingContextInterface $renderingContext
* @return string
*/
private static function evaluateElseClosures(array $closures, array $conditionClosures, RenderingContextInterface $renderingContext)
{
foreach ($closures as $elseNodeIndex => $elseNodeClosure) {
if (!isset($conditionClosures[$elseNodeIndex])) {
/var
/www
/clients
/client58
/web182
/web
/typo3temp
/var
/Cache
/Code
/fluid_template
/layout_Default_html_db3c6ef1238f3be810319586e5f08d8ab0b85085.php
$array290 = array (
);$array287['4'] = $renderingContext->getVariableProvider()->getByPath('tx_min_sitecore_datawrap', $array290);
$expression291 = function($context) {return ((($context["node0"]) || ($context["node2"])) || ($context["node4"]));};
$arguments285['condition'] = TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\BooleanNode::convertToBoolean(
$expression291(
TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\BooleanNode::gatherContext($renderingContext, $array287)
),
$renderingContext
);
$arguments285['__thenClosure'] = $renderChildrenClosure286;
$output193 .= TYPO3Fluid\Fluid\ViewHelpers\IfViewHelper::renderStatic($arguments285, $renderChildrenClosure286, $renderingContext);
$output193 .= '
';
return $output193;
};
$output73 .= TYPO3Fluid\Fluid\ViewHelpers\IfViewHelper::renderStatic($arguments93, $renderChildrenClosure94, $renderingContext);
$output73 .= '
';
// Rendering ViewHelper TYPO3Fluid\Fluid\ViewHelpers\IfViewHelper
$renderChildrenClosure498 = function() use ($renderingContext, $self) {
return '
</div>
';
};
$arguments497 = array();
$arguments497['then'] = NULL;
$arguments497['else'] = NULL;
$arguments497['condition'] = false;
// Rendering Boolean node
// Rendering Array
$array499 = array();
$array500 = array (
);$array499['0'] = $renderingContext->getVariableProvider()->getByPath('data.tx_min_sitecore_visibility_active', $array500);
$expression501 = function($context) {return ($context["node0"]);};
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/vendor
/typo3fluid
/fluid
/src
/ViewHelpers
/SpacelessViewHelper.php
* </output>
*/
class SpacelessViewHelper extends AbstractViewHelper
{
use CompileWithRenderStatic;
/**
* @var boolean
*/
protected $escapeOutput = false;
/**
* @param array $arguments
* @param \Closure $childClosure
* @param RenderingContextInterface $renderingContext
* @return string
*/
public static function renderStatic(array $arguments, \Closure $childClosure, RenderingContextInterface $renderingContext)
{
return trim(preg_replace('/\\>\\s+\\</', '><', $childClosure()));
}
}
/var
/www
/clients
/client58
/web182
/web
/typo3temp
/var
/Cache
/Code
/fluid_template
/layout_Default_html_db3c6ef1238f3be810319586e5f08d8ab0b85085.php
);$array499['0'] = $renderingContext->getVariableProvider()->getByPath('data.tx_min_sitecore_visibility_active', $array500);
$expression501 = function($context) {return ($context["node0"]);};
$arguments497['condition'] = TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\BooleanNode::convertToBoolean(
$expression501(
TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\BooleanNode::gatherContext($renderingContext, $array499)
),
$renderingContext
);
$arguments497['__thenClosure'] = $renderChildrenClosure498;
$output73 .= TYPO3Fluid\Fluid\ViewHelpers\IfViewHelper::renderStatic($arguments497, $renderChildrenClosure498, $renderingContext);
$output73 .= '
';
return $output73;
};
$arguments71 = array();
$output0 .= TYPO3Fluid\Fluid\ViewHelpers\SpacelessViewHelper::renderStatic($arguments71, $renderChildrenClosure72, $renderingContext);
$output0 .= '
';
return $output0;
}
}
#
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/vendor
/typo3fluid
/fluid
/src
/View
/AbstractTemplateView.php
}
if (!$parsedTemplate->hasLayout()) {
$this->startRendering(self::RENDERING_TEMPLATE, $parsedTemplate, $this->baseRenderingContext);
$output = $parsedTemplate->render($this->baseRenderingContext);
$this->stopRendering();
} else {
$layoutName = $parsedTemplate->getLayoutName($this->baseRenderingContext);
try {
$parsedLayout = $templateParser->getOrParseAndStoreTemplate(
$templatePaths->getLayoutIdentifier($layoutName),
function($parent, TemplatePaths $paths) use ($layoutName) {
return $paths->getLayoutSource($layoutName);
}
);
} catch (PassthroughSourceException $error) {
return $error->getSource();
}
$this->startRendering(self::RENDERING_LAYOUT, $parsedTemplate, $this->baseRenderingContext);
$output = $parsedLayout->render($this->baseRenderingContext);
$this->stopRendering();
}
return $output;
}
/**
* Renders a given section.
*
* @param string $sectionName Name of section to render
* @param array $variables The variables to use
* @param boolean $ignoreUnknown Ignore an unknown section and just return an empty string
* @return string rendered template for the section
* @throws InvalidSectionException
*/
public function renderSection($sectionName, array $variables = [], $ignoreUnknown = false)
{
$renderingContext = $this->getCurrentRenderingContext();
if ($this->getCurrentRenderingType() === self::RENDERING_LAYOUT) {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/FluidTemplateContentObject.php
* @param array $conf Configuration
*/
protected function assignSettings(array $conf)
{
if (isset($conf['settings.'])) {
/** @var $typoScriptService TypoScriptService */
$typoScriptService = GeneralUtility::makeInstance(TypoScriptService::class);
$settings = $typoScriptService->convertTypoScriptArrayToPlainArray($conf['settings.']);
$this->view->assign('settings', $settings);
}
}
/**
* Render fluid standalone view
*
* @return string
*/
protected function renderFluidView()
{
return $this->view->render();
}
/**
* Apply standard wrap to content
*
* @param string $content Rendered HTML content
* @param array $conf Configuration array
* @return string Standard wrapped content
*/
protected function applyStandardWrapToRenderedContent($content, array $conf)
{
if (isset($conf['stdWrap.'])) {
$content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
}
return $content;
}
/**
* Applies stdWrap on Fluid path definitions
*
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/FluidTemplateContentObject.php
$parentView = $this->view;
$this->initializeStandaloneViewInstance();
if (!is_array($conf)) {
$conf = [];
}
$this->setFormat($conf);
$this->setTemplate($conf);
$this->setLayoutRootPath($conf);
$this->setPartialRootPath($conf);
$this->setExtbaseVariables($conf);
$this->assignSettings($conf);
$variables = $this->getContentObjectVariables($conf);
$variables = $this->contentDataProcessor->process($this->cObj, $conf, $variables);
$this->view->assignMultiple($variables);
$this->renderFluidTemplateAssetsIntoPageRenderer();
$content = $this->renderFluidView();
$content = $this->applyStandardWrapToRenderedContent($content, $conf);
$this->view = $parentView;
return $content;
}
/**
* Attempts to render HeaderAssets and FooterAssets sections from the
* Fluid template, then adds each (if not empty) to either header or
* footer, as appropriate, using PageRenderer.
*/
protected function renderFluidTemplateAssetsIntoPageRenderer()
{
$pageRenderer = $this->getPageRenderer();
$headerAssets = $this->view->renderSection('HeaderAssets', ['contentObject' => $this], true);
$footerAssets = $this->view->renderSection('FooterAssets', ['contentObject' => $this], true);
if (!empty(trim($headerAssets))) {
$pageRenderer->addHeaderData($headerAssets);
}
if (!empty(trim($footerAssets))) {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
* @throws \Exception
* @return string
*/
public function render(AbstractContentObject $contentObject, $configuration = [])
{
$content = '';
// Evaluate possible cache and return
$cacheConfiguration = isset($configuration['cache.']) ? $configuration['cache.'] : null;
if ($cacheConfiguration !== null) {
unset($configuration['cache.']);
$cache = $this->getFromCache($cacheConfiguration);
if ($cache !== false) {
return $cache;
}
}
// 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;
} catch (\Exception $exception) {
$exceptionHandler = $this->createExceptionHandler($configuration);
if ($exceptionHandler === null) {
throw $exception;
}
$content = $exceptionHandler->handle($exception, $contentObject, $configuration);
}
// Store cache
if ($cacheConfiguration !== null) {
$key = $this->calculateCacheKey($cacheConfiguration);
if (!empty($key)) {
/** @var $cacheFrontend \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend */
$cacheFrontend = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_hash');
$tags = $this->calculateCacheTags($cacheConfiguration);
$lifetime = $this->calculateCacheLifetime($cacheConfiguration);
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
$timeTracker->incStackPointer();
$content .= $this->cObjGetSingle($name, $conf, $key);
$timeTracker->decStackPointer();
} else {
$hooked = false;
// Application defined cObjects
if (!empty($this->cObjHookObjectsRegistry[$name])) {
if (empty($this->cObjHookObjectsArr[$name])) {
$this->cObjHookObjectsArr[$name] = GeneralUtility::getUserObj($this->cObjHookObjectsRegistry[$name]);
}
$hookObj = $this->cObjHookObjectsArr[$name];
if (method_exists($hookObj, 'cObjGetSingleExt')) {
$content .= $hookObj->cObjGetSingleExt($name, $conf, $TSkey, $this);
$hooked = true;
}
}
if (!$hooked) {
$contentObject = $this->getContentObject($name);
if ($contentObject) {
$content .= $this->render($contentObject, $conf);
} else {
// Call hook functions for extra processing
if ($name && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] as $classData) {
$hookObject = GeneralUtility::getUserObj($classData);
if (!$hookObject instanceof ContentObjectGetSingleHookInterface) {
throw new \UnexpectedValueException('$hookObject must implement interface ' . ContentObjectGetSingleHookInterface::class, 1195043731);
}
/** @var $hookObject ContentObjectGetSingleHookInterface */
$content .= $hookObject->getSingleContentObject($name, (array)$conf, $TSkey, $this);
}
} else {
// Log error in AdminPanel
$warning = sprintf('Content Object "%s" does not exist', $name);
$timeTracker->setTSlogMessage($warning, 2);
}
}
}
}
if ($timeTracker->LR) {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
$content = '';
// Checking that the function is not called eternally. This is done by interrupting at a depth of 100
$this->getTypoScriptFrontendController()->cObjectDepthCounter--;
if ($this->getTypoScriptFrontendController()->cObjectDepthCounter > 0) {
$timeTracker = $this->getTimeTracker();
$name = trim($name);
if ($timeTracker->LR) {
$timeTracker->push($TSkey, $name);
}
// Checking if the COBJ is a reference to another object. (eg. name of 'blabla.blabla = < styles.something')
if ($name[0] === '<') {
$key = trim(substr($name, 1));
$cF = GeneralUtility::makeInstance(TypoScriptParser::class);
// $name and $conf is loaded with the referenced values.
$confOverride = is_array($conf) ? $conf : [];
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 (!empty($this->cObjHookObjectsRegistry[$name])) {
if (empty($this->cObjHookObjectsArr[$name])) {
$this->cObjHookObjectsArr[$name] = GeneralUtility::getUserObj($this->cObjHookObjectsRegistry[$name]);
}
$hookObj = $this->cObjHookObjectsArr[$name];
if (method_exists($hookObj, 'cObjGetSingleExt')) {
$content .= $hookObj->cObjGetSingleExt($name, $conf, $TSkey, $this);
$hooked = true;
}
}
if (!$hooked) {
$contentObject = $this->getContentObject($name);
if ($contentObject) {
$content .= $this->render($contentObject, $conf);
} else {
// Call hook functions for extra processing
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/CaseContentObject.php
* @param array $conf Array of TypoScript properties
* @return string Output
*/
public function render($conf = [])
{
if (!empty($conf['if.']) && !$this->cObj->checkIf($conf['if.'])) {
return '';
}
$setCurrent = isset($conf['setCurrent.']) ? $this->cObj->stdWrap($conf['setCurrent'], $conf['setCurrent.']) : $conf['setCurrent'];
if ($setCurrent) {
$this->cObj->data[$this->cObj->currentValKey] = $setCurrent;
}
$key = isset($conf['key.']) ? $this->cObj->stdWrap($conf['key'], $conf['key.']) : $conf['key'];
$key = (string)$conf[$key] !== '' ? $key : 'default';
// If no "default" property is available, then an empty string is returned
if ($key === 'default' && $conf['default'] === null) {
$theValue = '';
} else {
$theValue = $this->cObj->cObjGetSingle($conf[$key], $conf[$key . '.'], $key);
}
if (isset($conf['stdWrap.'])) {
$theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);
}
return $theValue;
}
}
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
* @throws \Exception
* @return string
*/
public function render(AbstractContentObject $contentObject, $configuration = [])
{
$content = '';
// Evaluate possible cache and return
$cacheConfiguration = isset($configuration['cache.']) ? $configuration['cache.'] : null;
if ($cacheConfiguration !== null) {
unset($configuration['cache.']);
$cache = $this->getFromCache($cacheConfiguration);
if ($cache !== false) {
return $cache;
}
}
// 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;
} catch (\Exception $exception) {
$exceptionHandler = $this->createExceptionHandler($configuration);
if ($exceptionHandler === null) {
throw $exception;
}
$content = $exceptionHandler->handle($exception, $contentObject, $configuration);
}
// Store cache
if ($cacheConfiguration !== null) {
$key = $this->calculateCacheKey($cacheConfiguration);
if (!empty($key)) {
/** @var $cacheFrontend \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend */
$cacheFrontend = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_hash');
$tags = $this->calculateCacheTags($cacheConfiguration);
$lifetime = $this->calculateCacheLifetime($cacheConfiguration);
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
$timeTracker->incStackPointer();
$content .= $this->cObjGetSingle($name, $conf, $key);
$timeTracker->decStackPointer();
} else {
$hooked = false;
// Application defined cObjects
if (!empty($this->cObjHookObjectsRegistry[$name])) {
if (empty($this->cObjHookObjectsArr[$name])) {
$this->cObjHookObjectsArr[$name] = GeneralUtility::getUserObj($this->cObjHookObjectsRegistry[$name]);
}
$hookObj = $this->cObjHookObjectsArr[$name];
if (method_exists($hookObj, 'cObjGetSingleExt')) {
$content .= $hookObj->cObjGetSingleExt($name, $conf, $TSkey, $this);
$hooked = true;
}
}
if (!$hooked) {
$contentObject = $this->getContentObject($name);
if ($contentObject) {
$content .= $this->render($contentObject, $conf);
} else {
// Call hook functions for extra processing
if ($name && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] as $classData) {
$hookObject = GeneralUtility::getUserObj($classData);
if (!$hookObject instanceof ContentObjectGetSingleHookInterface) {
throw new \UnexpectedValueException('$hookObject must implement interface ' . ContentObjectGetSingleHookInterface::class, 1195043731);
}
/** @var $hookObject ContentObjectGetSingleHookInterface */
$content .= $hookObject->getSingleContentObject($name, (array)$conf, $TSkey, $this);
}
} else {
// Log error in AdminPanel
$warning = sprintf('Content Object "%s" does not exist', $name);
$timeTracker->setTSlogMessage($warning, 2);
}
}
}
}
if ($timeTracker->LR) {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
$content = '';
// Checking that the function is not called eternally. This is done by interrupting at a depth of 100
$this->getTypoScriptFrontendController()->cObjectDepthCounter--;
if ($this->getTypoScriptFrontendController()->cObjectDepthCounter > 0) {
$timeTracker = $this->getTimeTracker();
$name = trim($name);
if ($timeTracker->LR) {
$timeTracker->push($TSkey, $name);
}
// Checking if the COBJ is a reference to another object. (eg. name of 'blabla.blabla = < styles.something')
if ($name[0] === '<') {
$key = trim(substr($name, 1));
$cF = GeneralUtility::makeInstance(TypoScriptParser::class);
// $name and $conf is loaded with the referenced values.
$confOverride = is_array($conf) ? $conf : [];
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 (!empty($this->cObjHookObjectsRegistry[$name])) {
if (empty($this->cObjHookObjectsArr[$name])) {
$this->cObjHookObjectsArr[$name] = GeneralUtility::getUserObj($this->cObjHookObjectsRegistry[$name]);
}
$hookObj = $this->cObjHookObjectsArr[$name];
if (method_exists($hookObj, 'cObjGetSingleExt')) {
$content .= $hookObj->cObjGetSingleExt($name, $conf, $TSkey, $this);
$hooked = true;
}
}
if (!$hooked) {
$contentObject = $this->getContentObject($name);
if ($contentObject) {
$content .= $this->render($contentObject, $conf);
} else {
// Call hook functions for extra processing
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentContentObject.php
/** @var $cObj ContentObjectRenderer */
$cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
$cObj->setParent($this->cObj->data, $this->cObj->currentRecord);
$this->cObj->currentRecordNumber = 0;
foreach ($records as $row) {
// Call hook for possible manipulation of database row for cObj->data
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content_content.php']['modifyDBRow'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content_content.php']['modifyDBRow'] as $_classRef) {
$_procObj = GeneralUtility::getUserObj($_classRef);
$_procObj->modifyDBRow($row, $conf['table']);
}
}
if (!$frontendController->recordRegister[$conf['table'] . ':' . $row['uid']]) {
$this->cObj->currentRecordNumber++;
$cObj->parentRecordNumber = $this->cObj->currentRecordNumber;
$frontendController->currentRecord = $conf['table'] . ':' . $row['uid'];
$this->cObj->lastChanged($row['tstamp']);
$cObj->start($row, $conf['table']);
$tmpValue = $cObj->cObjGetSingle($renderObjName, $renderObjConf, $renderObjKey);
$cobjValue .= $tmpValue;
}
}
}
if ($slideCollectReverse) {
$theValue = $cobjValue . $theValue;
} else {
$theValue .= $cobjValue;
}
if ($slideCollect > 0) {
$slideCollect--;
}
if ($slide) {
if ($slide > 0) {
$slide--;
}
$conf['select.']['pidInList'] = $this->cObj->getSlidePids($conf['select.']['pidInList'], $conf['select.']['pidInList.']);
if (isset($conf['select.']['pidInList.'])) {
unset($conf['select.']['pidInList.']);
}
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
* @throws \Exception
* @return string
*/
public function render(AbstractContentObject $contentObject, $configuration = [])
{
$content = '';
// Evaluate possible cache and return
$cacheConfiguration = isset($configuration['cache.']) ? $configuration['cache.'] : null;
if ($cacheConfiguration !== null) {
unset($configuration['cache.']);
$cache = $this->getFromCache($cacheConfiguration);
if ($cache !== false) {
return $cache;
}
}
// 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;
} catch (\Exception $exception) {
$exceptionHandler = $this->createExceptionHandler($configuration);
if ($exceptionHandler === null) {
throw $exception;
}
$content = $exceptionHandler->handle($exception, $contentObject, $configuration);
}
// Store cache
if ($cacheConfiguration !== null) {
$key = $this->calculateCacheKey($cacheConfiguration);
if (!empty($key)) {
/** @var $cacheFrontend \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend */
$cacheFrontend = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_hash');
$tags = $this->calculateCacheTags($cacheConfiguration);
$lifetime = $this->calculateCacheLifetime($cacheConfiguration);
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
$timeTracker->incStackPointer();
$content .= $this->cObjGetSingle($name, $conf, $key);
$timeTracker->decStackPointer();
} else {
$hooked = false;
// Application defined cObjects
if (!empty($this->cObjHookObjectsRegistry[$name])) {
if (empty($this->cObjHookObjectsArr[$name])) {
$this->cObjHookObjectsArr[$name] = GeneralUtility::getUserObj($this->cObjHookObjectsRegistry[$name]);
}
$hookObj = $this->cObjHookObjectsArr[$name];
if (method_exists($hookObj, 'cObjGetSingleExt')) {
$content .= $hookObj->cObjGetSingleExt($name, $conf, $TSkey, $this);
$hooked = true;
}
}
if (!$hooked) {
$contentObject = $this->getContentObject($name);
if ($contentObject) {
$content .= $this->render($contentObject, $conf);
} else {
// Call hook functions for extra processing
if ($name && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] as $classData) {
$hookObject = GeneralUtility::getUserObj($classData);
if (!$hookObject instanceof ContentObjectGetSingleHookInterface) {
throw new \UnexpectedValueException('$hookObject must implement interface ' . ContentObjectGetSingleHookInterface::class, 1195043731);
}
/** @var $hookObject ContentObjectGetSingleHookInterface */
$content .= $hookObject->getSingleContentObject($name, (array)$conf, $TSkey, $this);
}
} else {
// Log error in AdminPanel
$warning = sprintf('Content Object "%s" does not exist', $name);
$timeTracker->setTSlogMessage($warning, 2);
}
}
}
}
if ($timeTracker->LR) {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
* Rendering of a "numerical array" of cObjects from TypoScript
* Will call ->cObjGetSingle() for each cObject found and accumulate the output.
*
* @param array $setup array with cObjects as values.
* @param string $addKey A prefix for the debugging information
* @return string Rendered output from the cObjects in the array.
* @see cObjGetSingle()
*/
public function cObjGet($setup, $addKey = '')
{
if (!is_array($setup)) {
return '';
}
$sKeyArray = ArrayUtility::filterAndSortByNumericKeys($setup);
$content = '';
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;
}
/**
* Renders a content object
*
* @param string $name The content object name, eg. "TEXT" or "USER" or "IMAGE
* @param array $conf The array with TypoScript properties for the content object
* @param string $TSkey A string label used for the internal debugging tracking.
* @return string cObject output
* @throws \UnexpectedValueException
*/
public function cObjGetSingle($name, $conf, $TSkey = '__')
{
$content = '';
// Checking that the function is not called eternally. This is done by interrupting at a depth of 100
$this->getTypoScriptFrontendController()->cObjectDepthCounter--;
if ($this->getTypoScriptFrontendController()->cObjectDepthCounter > 0) {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectArrayContentObject.php
*/
class ContentObjectArrayContentObject extends AbstractContentObject
{
/**
* Rendering the cObject, COBJ_ARRAY / COA
*
* @param array $conf Array of TypoScript properties
* @return string Output
*/
public function render($conf = [])
{
if (empty($conf)) {
$this->getTimeTracker()->setTSlogMessage('No elements in this content object array (COBJ_ARRAY, COA).', 2);
return '';
}
if (!empty($conf['if.']) && !$this->cObj->checkIf($conf['if.'])) {
return '';
}
$content = $this->cObj->cObjGet($conf);
$wrap = isset($conf['wrap.']) ? $this->cObj->stdWrap($conf['wrap'], $conf['wrap.']) : $conf['wrap'];
if ($wrap) {
$content = $this->cObj->wrap($content, $wrap);
}
if (isset($conf['stdWrap.'])) {
$content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
}
return $content;
}
/**
* @return TimeTracker
*/
protected function getTimeTracker()
{
return GeneralUtility::makeInstance(TimeTracker::class);
}
}
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
* @throws \Exception
* @return string
*/
public function render(AbstractContentObject $contentObject, $configuration = [])
{
$content = '';
// Evaluate possible cache and return
$cacheConfiguration = isset($configuration['cache.']) ? $configuration['cache.'] : null;
if ($cacheConfiguration !== null) {
unset($configuration['cache.']);
$cache = $this->getFromCache($cacheConfiguration);
if ($cache !== false) {
return $cache;
}
}
// 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;
} catch (\Exception $exception) {
$exceptionHandler = $this->createExceptionHandler($configuration);
if ($exceptionHandler === null) {
throw $exception;
}
$content = $exceptionHandler->handle($exception, $contentObject, $configuration);
}
// Store cache
if ($cacheConfiguration !== null) {
$key = $this->calculateCacheKey($cacheConfiguration);
if (!empty($key)) {
/** @var $cacheFrontend \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend */
$cacheFrontend = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_hash');
$tags = $this->calculateCacheTags($cacheConfiguration);
$lifetime = $this->calculateCacheLifetime($cacheConfiguration);
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
$timeTracker->incStackPointer();
$content .= $this->cObjGetSingle($name, $conf, $key);
$timeTracker->decStackPointer();
} else {
$hooked = false;
// Application defined cObjects
if (!empty($this->cObjHookObjectsRegistry[$name])) {
if (empty($this->cObjHookObjectsArr[$name])) {
$this->cObjHookObjectsArr[$name] = GeneralUtility::getUserObj($this->cObjHookObjectsRegistry[$name]);
}
$hookObj = $this->cObjHookObjectsArr[$name];
if (method_exists($hookObj, 'cObjGetSingleExt')) {
$content .= $hookObj->cObjGetSingleExt($name, $conf, $TSkey, $this);
$hooked = true;
}
}
if (!$hooked) {
$contentObject = $this->getContentObject($name);
if ($contentObject) {
$content .= $this->render($contentObject, $conf);
} else {
// Call hook functions for extra processing
if ($name && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] as $classData) {
$hookObject = GeneralUtility::getUserObj($classData);
if (!$hookObject instanceof ContentObjectGetSingleHookInterface) {
throw new \UnexpectedValueException('$hookObject must implement interface ' . ContentObjectGetSingleHookInterface::class, 1195043731);
}
/** @var $hookObject ContentObjectGetSingleHookInterface */
$content .= $hookObject->getSingleContentObject($name, (array)$conf, $TSkey, $this);
}
} else {
// Log error in AdminPanel
$warning = sprintf('Content Object "%s" does not exist', $name);
$timeTracker->setTSlogMessage($warning, 2);
}
}
}
}
if ($timeTracker->LR) {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/fluid
/Classes
/ViewHelpers
/CObjectViewHelper.php
} elseif (is_string($data) || is_numeric($data)) {
$currentValue = (string)$data;
$data = [$data];
}
$this->contentObjectRenderer->start($data, $table);
if ($currentValue !== null) {
$this->contentObjectRenderer->setCurrentVal($currentValue);
} elseif ($currentValueKey !== null && isset($data[$currentValueKey])) {
$this->contentObjectRenderer->setCurrentVal($data[$currentValueKey]);
}
$pathSegments = GeneralUtility::trimExplode('.', $typoscriptObjectPath);
$lastSegment = array_pop($pathSegments);
$setup = $this->typoScriptSetup;
foreach ($pathSegments as $segment) {
if (!array_key_exists(($segment . '.'), $setup)) {
throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('TypoScript object path "' . htmlspecialchars($typoscriptObjectPath) . '" does not exist', 1253191023);
}
$setup = $setup[$segment . '.'];
}
$content = $this->contentObjectRenderer->cObjGetSingle($setup[$lastSegment], $setup[$lastSegment . '.']);
if (TYPO3_MODE === 'BE') {
$this->resetFrontendEnvironment();
}
return $content;
}
/**
* Sets the $TSFE->cObjectDepthCounter in Backend mode
* This somewhat hacky work around is currently needed because the cObjGetSingle() function of \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer relies on this setting
*/
protected function simulateFrontendEnvironment()
{
$this->tsfeBackup = isset($GLOBALS['TSFE']) ? $GLOBALS['TSFE'] : null;
$GLOBALS['TSFE'] = new \stdClass();
$GLOBALS['TSFE']->cObjectDepthCounter = 100;
}
/**
* Resets $GLOBALS['TSFE'] if it was previously changed by simulateFrontendEnvironment()
*
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/fluid
/Classes
/Core
/ViewHelper
/AbstractViewHelper.php
$this->reflectionService = $reflectionService;
}
/**
* Call the render() method and handle errors.
*
* @return string the rendered ViewHelper
* @throws Exception
*/
protected function callRenderMethod()
{
$renderMethodParameters = [];
foreach ($this->argumentDefinitions as $argumentName => $argumentDefinition) {
if ($argumentDefinition instanceof \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition && $argumentDefinition->isMethodParameter()) {
$renderMethodParameters[$argumentName] = $this->arguments[$argumentName];
}
}
try {
return call_user_func_array([$this, 'render'], $renderMethodParameters);
} catch (Exception $exception) {
if (GeneralUtility::getApplicationContext()->isProduction()) {
$this->getLogger()->error('A Fluid ViewHelper Exception was captured: ' . $exception->getMessage() . ' (' . $exception->getCode() . ')', ['exception' => $exception]);
return '';
}
throw $exception;
}
}
/**
* @return LoggerInterface
*/
protected function getLogger()
{
return GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);
}
/**
* Register method arguments for "render" by analysing the doc comment above.
*
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/fluid
/Classes
/Core
/ViewHelper
/AbstractViewHelper.php
$this->reflectionService = $reflectionService;
}
/**
* Call the render() method and handle errors.
*
* @return string the rendered ViewHelper
* @throws Exception
*/
protected function callRenderMethod()
{
$renderMethodParameters = [];
foreach ($this->argumentDefinitions as $argumentName => $argumentDefinition) {
if ($argumentDefinition instanceof \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition && $argumentDefinition->isMethodParameter()) {
$renderMethodParameters[$argumentName] = $this->arguments[$argumentName];
}
}
try {
return call_user_func_array([$this, 'render'], $renderMethodParameters);
} catch (Exception $exception) {
if (GeneralUtility::getApplicationContext()->isProduction()) {
$this->getLogger()->error('A Fluid ViewHelper Exception was captured: ' . $exception->getMessage() . ' (' . $exception->getCode() . ')', ['exception' => $exception]);
return '';
}
throw $exception;
}
}
/**
* @return LoggerInterface
*/
protected function getLogger()
{
return GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);
}
/**
* Register method arguments for "render" by analysing the doc comment above.
*
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/vendor
/typo3fluid
/fluid
/src
/Core
/ViewHelper
/AbstractViewHelper.php
*
* @param \Closure $renderChildrenClosure
* @return void
*/
public function setRenderChildrenClosure(\Closure $renderChildrenClosure)
{
$this->renderChildrenClosure = $renderChildrenClosure;
}
/**
* Initialize the arguments of the ViewHelper, and call the render() method of the ViewHelper.
*
* @return string the rendered ViewHelper.
*/
public function initializeArgumentsAndRender()
{
$this->validateArguments();
$this->initialize();
return $this->callRenderMethod();
}
/**
* Call the render() method and handle errors.
*
* @return string the rendered ViewHelper
* @throws Exception
*/
protected function callRenderMethod()
{
return call_user_func([$this, 'render']);
}
/**
* Initializes the view helper before invoking the render method.
*
* Override this method to solve tasks before the view helper content is rendered.
*
* @return void
* @api
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/vendor
/typo3fluid
/fluid
/src
/Core
/ViewHelper
/ViewHelperInvoker.php
/** @var NodeInterface|mixed $argumentValue */
$argumentValue = $arguments[$argumentName];
$evaluatedArguments[$argumentName] = $argumentValue instanceof NodeInterface ? $argumentValue->evaluate($renderingContext) : $argumentValue;
} else {
$evaluatedArguments[$argumentName] = $argumentDefinition->getDefaultValue();
}
}
foreach ($arguments as $argumentName => $argumentValue) {
if (!array_key_exists($argumentName, $evaluatedArguments)) {
$undeclaredArguments[$argumentName] = $argumentValue instanceof NodeInterface ? $argumentValue->evaluate($renderingContext) : $argumentValue;
}
}
if ($renderChildrenClosure) {
$viewHelper->setRenderChildrenClosure($renderChildrenClosure);
}
$viewHelper->setRenderingContext($renderingContext);
$viewHelper->setArguments($evaluatedArguments);
$viewHelper->handleAdditionalArguments($undeclaredArguments);
return $viewHelper->initializeArgumentsAndRender();
} catch (Exception $error) {
return $renderingContext->getErrorHandler()->handleViewHelperError($error);
}
}
}
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/vendor
/typo3fluid
/fluid
/src
/Core
/ViewHelper
/AbstractViewHelper.php
get_class($this),
$argumentsName,
$closureName
);
}
/**
* Default implementation of static rendering; useful API method if your ViewHelper
* when compiled is able to render itself statically to increase performance. This
* default implementation will simply delegate to the ViewHelperInvoker.
*
* @param array $arguments
* @param \Closure $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
* @return mixed
*/
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.
* called directly after the ViewHelper was built.
*
* @param ViewHelperNode $node
* @param TextNode[] $arguments
* @param VariableProviderInterface $variableContainer
* @return void
*/
public static function postParseEvent(ViewHelperNode $node, array $arguments, VariableProviderInterface $variableContainer)
{
}
/**
* Resets the ViewHelper state.
*
* Overwrite this method if you need to get a clean state of your ViewHelper.
*
/var
/www
/clients
/client58
/web182
/web
/typo3temp
/var
/Cache
/Code
/fluid_template
/Standard_action_Two_Cols_Right_1a6daae276e02a6337c6ff098ec9c2077155133e.php
$arguments48['table'] = '';
$arguments48['typoscriptObjectPath'] = 'belayout.2cols.sidebar.right.equalize.watch';
$output0 .= TYPO3\CMS\Fluid\ViewHelpers\CObjectViewHelper::renderStatic($arguments48, $renderChildrenClosure49, $renderingContext);
$output0 .= '>
<!--content-->
';
// Rendering ViewHelper TYPO3\CMS\Fluid\ViewHelpers\CObjectViewHelper
$renderChildrenClosure51 = function() use ($renderingContext, $self) {
return NULL;
};
$arguments50 = array();
$arguments50['typoscriptObjectPath'] = NULL;
$arguments50['data'] = NULL;
$arguments50['currentValueKey'] = NULL;
$arguments50['table'] = '';
$arguments50['typoscriptObjectPath'] = 'lib.content';
$output0 .= TYPO3\CMS\Fluid\ViewHelpers\CObjectViewHelper::renderStatic($arguments50, $renderChildrenClosure51, $renderingContext);
$output0 .= '
<!--/content-->
</div>
<div class="';
// Rendering ViewHelper TYPO3\CMS\Fluid\ViewHelpers\CObjectViewHelper
$renderChildrenClosure53 = function() use ($renderingContext, $self) {
return NULL;
};
$arguments52 = array();
$arguments52['typoscriptObjectPath'] = NULL;
$arguments52['data'] = NULL;
$arguments52['currentValueKey'] = NULL;
$arguments52['table'] = '';
$arguments52['typoscriptObjectPath'] = 'belayout.2cols.sidebar.right.colpos.2';
$output0 .= TYPO3\CMS\Fluid\ViewHelpers\CObjectViewHelper::renderStatic($arguments52, $renderChildrenClosure53, $renderingContext);
$output0 .= '" ';
// Rendering ViewHelper TYPO3\CMS\Fluid\ViewHelpers\CObjectViewHelper
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/vendor
/typo3fluid
/fluid
/src
/View
/AbstractTemplateView.php
$parsedTemplate = $this->getCurrentParsedTemplate();
} catch (PassthroughSourceException $error) {
return $error->getSource();
} catch (Exception $error) {
return $renderingContext->getErrorHandler()->handleViewError($error);
}
if ($parsedTemplate->isCompiled()) {
$methodNameOfSection = 'section_' . sha1($sectionName);
if (!method_exists($parsedTemplate, $methodNameOfSection)) {
if ($ignoreUnknown) {
return '';
} else {
return $renderingContext->getErrorHandler()->handleViewError(
new InvalidSectionException('Section "' . $sectionName . '" does not exist.')
);
}
}
$this->startRendering($renderingTypeOnNextLevel, $parsedTemplate, $renderingContext);
$output = $parsedTemplate->$methodNameOfSection($renderingContext);
$this->stopRendering();
} else {
$sections = $parsedTemplate->getVariableContainer()->get('1457379500_sections');
if (!isset($sections[$sectionName])) {
if ($ignoreUnknown) {
return '';
}
return $renderingContext->getErrorHandler()->handleViewError(
new InvalidSectionException('Section "' . $sectionName . '" does not exist.')
);
}
/** @var $section ViewHelperNode */
$section = $sections[$sectionName];
$renderingContext->getViewHelperVariableContainer()->add(
SectionViewHelper::class,
'isCurrentlyRenderingSection',
true
);
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/vendor
/typo3fluid
/fluid
/src
/ViewHelpers
/RenderViewHelper.php
$tagContent = $renderChildrenClosure();
if ($arguments['contentAs']) {
$variables[$arguments['contentAs']] = $tagContent;
}
$view = $renderingContext->getViewHelperVariableContainer()->getView();
$content = '';
if ($renderable) {
$content = $renderable->render($renderingContext);
} elseif ($delegate !== null) {
if (!is_a($delegate, ParsedTemplateInterface::class, true)) {
throw new \InvalidArgumentException(sprintf('Cannot render %s - must implement ParsedTemplateInterface!', $delegate));
}
$renderingContext = clone $renderingContext;
$renderingContext->getVariableProvider()->setSource($variables);
$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
// not set, NULL is returned and cast to a new, empty string
// outside of this ViewHelper.
if ($content === '') {
$content = $arguments['default'] ?: $tagContent;
}
return $content;
}
}
/var
/www
/clients
/client58
/web182
/web
/typo3temp
/var
/Cache
/Code
/fluid_template
/layout_Default_html_d16e255ccef177b2f20c9a88da4dda04f4987991.php
public function render(\TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $renderingContext) {
$self = $this;
$output0 = '';
// Rendering ViewHelper TYPO3Fluid\Fluid\ViewHelpers\RenderViewHelper
$renderChildrenClosure2 = function() use ($renderingContext, $self) {
return NULL;
};
$arguments1 = array();
$arguments1['section'] = NULL;
$arguments1['partial'] = NULL;
$arguments1['delegate'] = NULL;
$arguments1['renderable'] = NULL;
$arguments1['arguments'] = array (
);
$arguments1['optional'] = false;
$arguments1['default'] = NULL;
$arguments1['contentAs'] = NULL;
$arguments1['section'] = 'Main';
$output0 .= TYPO3Fluid\Fluid\ViewHelpers\RenderViewHelper::renderStatic($arguments1, $renderChildrenClosure2, $renderingContext);
$output0 .= '
';
return $output0;
}
}
#
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/vendor
/typo3fluid
/fluid
/src
/View
/AbstractTemplateView.php
}
if (!$parsedTemplate->hasLayout()) {
$this->startRendering(self::RENDERING_TEMPLATE, $parsedTemplate, $this->baseRenderingContext);
$output = $parsedTemplate->render($this->baseRenderingContext);
$this->stopRendering();
} else {
$layoutName = $parsedTemplate->getLayoutName($this->baseRenderingContext);
try {
$parsedLayout = $templateParser->getOrParseAndStoreTemplate(
$templatePaths->getLayoutIdentifier($layoutName),
function($parent, TemplatePaths $paths) use ($layoutName) {
return $paths->getLayoutSource($layoutName);
}
);
} catch (PassthroughSourceException $error) {
return $error->getSource();
}
$this->startRendering(self::RENDERING_LAYOUT, $parsedTemplate, $this->baseRenderingContext);
$output = $parsedLayout->render($this->baseRenderingContext);
$this->stopRendering();
}
return $output;
}
/**
* Renders a given section.
*
* @param string $sectionName Name of section to render
* @param array $variables The variables to use
* @param boolean $ignoreUnknown Ignore an unknown section and just return an empty string
* @return string rendered template for the section
* @throws InvalidSectionException
*/
public function renderSection($sectionName, array $variables = [], $ignoreUnknown = false)
{
$renderingContext = $this->getCurrentRenderingContext();
if ($this->getCurrentRenderingType() === self::RENDERING_LAYOUT) {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/FluidTemplateContentObject.php
* @param array $conf Configuration
*/
protected function assignSettings(array $conf)
{
if (isset($conf['settings.'])) {
/** @var $typoScriptService TypoScriptService */
$typoScriptService = GeneralUtility::makeInstance(TypoScriptService::class);
$settings = $typoScriptService->convertTypoScriptArrayToPlainArray($conf['settings.']);
$this->view->assign('settings', $settings);
}
}
/**
* Render fluid standalone view
*
* @return string
*/
protected function renderFluidView()
{
return $this->view->render();
}
/**
* Apply standard wrap to content
*
* @param string $content Rendered HTML content
* @param array $conf Configuration array
* @return string Standard wrapped content
*/
protected function applyStandardWrapToRenderedContent($content, array $conf)
{
if (isset($conf['stdWrap.'])) {
$content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
}
return $content;
}
/**
* Applies stdWrap on Fluid path definitions
*
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/FluidTemplateContentObject.php
$parentView = $this->view;
$this->initializeStandaloneViewInstance();
if (!is_array($conf)) {
$conf = [];
}
$this->setFormat($conf);
$this->setTemplate($conf);
$this->setLayoutRootPath($conf);
$this->setPartialRootPath($conf);
$this->setExtbaseVariables($conf);
$this->assignSettings($conf);
$variables = $this->getContentObjectVariables($conf);
$variables = $this->contentDataProcessor->process($this->cObj, $conf, $variables);
$this->view->assignMultiple($variables);
$this->renderFluidTemplateAssetsIntoPageRenderer();
$content = $this->renderFluidView();
$content = $this->applyStandardWrapToRenderedContent($content, $conf);
$this->view = $parentView;
return $content;
}
/**
* Attempts to render HeaderAssets and FooterAssets sections from the
* Fluid template, then adds each (if not empty) to either header or
* footer, as appropriate, using PageRenderer.
*/
protected function renderFluidTemplateAssetsIntoPageRenderer()
{
$pageRenderer = $this->getPageRenderer();
$headerAssets = $this->view->renderSection('HeaderAssets', ['contentObject' => $this], true);
$footerAssets = $this->view->renderSection('FooterAssets', ['contentObject' => $this], true);
if (!empty(trim($headerAssets))) {
$pageRenderer->addHeaderData($headerAssets);
}
if (!empty(trim($footerAssets))) {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
* @throws \Exception
* @return string
*/
public function render(AbstractContentObject $contentObject, $configuration = [])
{
$content = '';
// Evaluate possible cache and return
$cacheConfiguration = isset($configuration['cache.']) ? $configuration['cache.'] : null;
if ($cacheConfiguration !== null) {
unset($configuration['cache.']);
$cache = $this->getFromCache($cacheConfiguration);
if ($cache !== false) {
return $cache;
}
}
// 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;
} catch (\Exception $exception) {
$exceptionHandler = $this->createExceptionHandler($configuration);
if ($exceptionHandler === null) {
throw $exception;
}
$content = $exceptionHandler->handle($exception, $contentObject, $configuration);
}
// Store cache
if ($cacheConfiguration !== null) {
$key = $this->calculateCacheKey($cacheConfiguration);
if (!empty($key)) {
/** @var $cacheFrontend \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend */
$cacheFrontend = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_hash');
$tags = $this->calculateCacheTags($cacheConfiguration);
$lifetime = $this->calculateCacheLifetime($cacheConfiguration);
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
$timeTracker->incStackPointer();
$content .= $this->cObjGetSingle($name, $conf, $key);
$timeTracker->decStackPointer();
} else {
$hooked = false;
// Application defined cObjects
if (!empty($this->cObjHookObjectsRegistry[$name])) {
if (empty($this->cObjHookObjectsArr[$name])) {
$this->cObjHookObjectsArr[$name] = GeneralUtility::getUserObj($this->cObjHookObjectsRegistry[$name]);
}
$hookObj = $this->cObjHookObjectsArr[$name];
if (method_exists($hookObj, 'cObjGetSingleExt')) {
$content .= $hookObj->cObjGetSingleExt($name, $conf, $TSkey, $this);
$hooked = true;
}
}
if (!$hooked) {
$contentObject = $this->getContentObject($name);
if ($contentObject) {
$content .= $this->render($contentObject, $conf);
} else {
// Call hook functions for extra processing
if ($name && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClassDefault'] as $classData) {
$hookObject = GeneralUtility::getUserObj($classData);
if (!$hookObject instanceof ContentObjectGetSingleHookInterface) {
throw new \UnexpectedValueException('$hookObject must implement interface ' . ContentObjectGetSingleHookInterface::class, 1195043731);
}
/** @var $hookObject ContentObjectGetSingleHookInterface */
$content .= $hookObject->getSingleContentObject($name, (array)$conf, $TSkey, $this);
}
} else {
// Log error in AdminPanel
$warning = sprintf('Content Object "%s" does not exist', $name);
$timeTracker->setTSlogMessage($warning, 2);
}
}
}
}
if ($timeTracker->LR) {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/ContentObject
/ContentObjectRenderer.php
* Rendering of a "numerical array" of cObjects from TypoScript
* Will call ->cObjGetSingle() for each cObject found and accumulate the output.
*
* @param array $setup array with cObjects as values.
* @param string $addKey A prefix for the debugging information
* @return string Rendered output from the cObjects in the array.
* @see cObjGetSingle()
*/
public function cObjGet($setup, $addKey = '')
{
if (!is_array($setup)) {
return '';
}
$sKeyArray = ArrayUtility::filterAndSortByNumericKeys($setup);
$content = '';
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;
}
/**
* Renders a content object
*
* @param string $name The content object name, eg. "TEXT" or "USER" or "IMAGE
* @param array $conf The array with TypoScript properties for the content object
* @param string $TSkey A string label used for the internal debugging tracking.
* @return string cObject output
* @throws \UnexpectedValueException
*/
public function cObjGetSingle($name, $conf, $TSkey = '__')
{
$content = '';
// Checking that the function is not called eternally. This is done by interrupting at a depth of 100
$this->getTypoScriptFrontendController()->cObjectDepthCounter--;
if ($this->getTypoScriptFrontendController()->cObjectDepthCounter > 0) {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/Page
/PageGenerator.php
} else {
static::getPageRenderer()->setRenderXhtml(false);
}
}
/**
* Rendering the page content
*/
public static function renderContent()
{
/** @var TypoScriptFrontendController $tsfe */
$tsfe = $GLOBALS['TSFE'];
/** @var TimeTracker $timeTracker */
$timeTracker = GeneralUtility::makeInstance(TimeTracker::class);
// PAGE CONTENT
$timeTracker->incStackPointer();
$timeTracker->push($tsfe->sPre, 'PAGE');
$pageContent = $tsfe->cObj->cObjGet($tsfe->pSetup);
if ($tsfe->pSetup['wrap']) {
$pageContent = $tsfe->cObj->wrap($pageContent, $tsfe->pSetup['wrap']);
}
if ($tsfe->pSetup['stdWrap.']) {
$pageContent = $tsfe->cObj->stdWrap($pageContent, $tsfe->pSetup['stdWrap.']);
}
// PAGE HEADER (after content - maybe JS is inserted!
// if 'disableAllHeaderCode' is set, all the header-code is discarded!
if ($tsfe->config['config']['disableAllHeaderCode']) {
$tsfe->content = $pageContent;
} else {
self::renderContentWithHeader($pageContent);
}
$timeTracker->pull($timeTracker->LR ? $tsfe->content : '');
$timeTracker->decStackPointer();
}
/**
* Rendering normal HTML-page with header by wrapping the generated content ($pageContent) in body-tags and setting the header accordingly.
*
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/Http
/RequestHandler.php
$this->controller->handleDataSubmission();
// Check for shortcut page and redirect
$this->controller->checkPageForShortcutRedirect();
$this->controller->checkPageForMountpointRedirect();
// Generate page
$this->controller->setUrlIdToken();
$this->timeTracker->push('Page generation', '');
if ($this->controller->isGeneratePage()) {
$this->controller->generatePage_preProcessing();
$temp_theScript = $this->controller->generatePage_whichScript();
if ($temp_theScript) {
include $temp_theScript;
} else {
$this->controller->preparePageContentGeneration();
// Content generation
if (!$this->controller->isINTincScript()) {
PageGenerator::renderContent();
$this->controller->setAbsRefPrefix();
}
}
$this->controller->generatePage_postProcessing();
} elseif ($this->controller->isINTincScript()) {
$this->controller->preparePageContentGeneration();
}
$this->controller->releaseLocks();
$this->timeTracker->pull();
// Render non-cached parts
if ($this->controller->isINTincScript()) {
$this->timeTracker->push('Non-cached objects', '');
$this->controller->INTincScript();
$this->timeTracker->pull();
}
// Output content
$sendTSFEContent = false;
if ($this->controller->isOutputting()) {
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/core
/Classes
/Core
/Bootstrap.php
ksort($suitableRequestHandlers);
return array_pop($suitableRequestHandlers);
}
/**
* Builds a Request instance from the current process, and then resolves the request
* through the request handlers depending on Frontend, Backend, CLI etc.
*
* @param \Psr\Http\Message\RequestInterface|\Symfony\Component\Console\Input\InputInterface $request
* @return Bootstrap
* @throws \TYPO3\CMS\Core\Exception
* @internal This is not a public API method, do not use in own extensions
*/
public function handleRequest($request)
{
// Resolve request handler that were registered based on the Application
$requestHandler = $this->resolveRequestHandler($request);
// Execute the command which returns a Response object or NULL
$this->response = $requestHandler->handleRequest($request);
return $this;
}
/**
* Outputs content if there is a proper Response object.
*
* @return Bootstrap
*/
protected function sendResponse()
{
if ($this->response instanceof \Psr\Http\Message\ResponseInterface) {
if (!headers_sent()) {
// If the response code was not changed by legacy code (still is 200)
// then allow the PSR-7 response object to explicitly set it.
// Otherwise let legacy code take precedence.
// This code path can be deprecated once we expose the response object to third party code
if (http_response_code() === 200) {
header('HTTP/' . $this->response->getProtocolVersion() . ' ' . $this->response->getStatusCode() . ' ' . $this->response->getReasonPhrase());
}
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Classes
/Http
/Application.php
// Redirect to install tool if base configuration is not found
if (!$this->bootstrap->checkIfEssentialConfigurationExists()) {
$this->bootstrap->redirectToInstallTool($this->entryPointLevel);
}
foreach ($this->availableRequestHandlers as $requestHandler) {
$this->bootstrap->registerRequestHandlerImplementation($requestHandler);
}
$this->bootstrap->configure();
}
/**
* Starting point
*
* @param callable $execute
*/
public function run(callable $execute = null)
{
$this->bootstrap->handleRequest(\TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals());
if ($execute !== null) {
call_user_func($execute);
}
$this->bootstrap->shutdown();
}
/**
* Define constants and variables
*/
protected function defineLegacyConstants()
{
define('TYPO3_MODE', 'FE');
}
}
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Resources
/Private
/Php
/frontend.php
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
// Exit early if php requirement is not satisfied.
if (version_compare(PHP_VERSION, '7.0.0', '<')) {
die('This version of TYPO3 CMS requires PHP 7.0 or above');
}
// Set up the application for the Frontend
call_user_func(function () {
$classLoader = require __DIR__ . '/../../../../../../vendor/autoload.php';
(new \TYPO3\CMS\Frontend\Http\Application($classLoader))->run();
});
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/typo3
/sysext
/frontend
/Resources
/Private
/Php
/frontend.php
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
// Exit early if php requirement is not satisfied.
if (version_compare(PHP_VERSION, '7.0.0', '<')) {
die('This version of TYPO3 CMS requires PHP 7.0 or above');
}
// Set up the application for the Frontend
call_user_func(function () {
$classLoader = require __DIR__ . '/../../../../../../vendor/autoload.php';
(new \TYPO3\CMS\Frontend\Http\Application($classLoader))->run();
});
/var
/www
/clients
/client58
/web182
/web
/files
/TYPO3.CMS
/index.php
<?php
require __DIR__ . '/typo3/sysext/frontend/Resources/Private/Php/frontend.php';