‪TYPO3CMS  ‪main
TYPO3\CMS\Frontend\Middleware\PrepareTypoScriptFrontendRendering Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\Middleware\PrepareTypoScriptFrontendRendering:

Public Member Functions

 __construct (private EventDispatcherInterface $eventDispatcher, private FrontendTypoScriptFactory $frontendTypoScriptFactory, #[Autowire(service:'cache.typoscript')] private PhpFrontend $typoScriptCache, #[Autowire(service:'cache.pages')] private FrontendInterface $pageCache, private ResourceMutex $lock, private Context $context, private LoggerInterface $logger, private ErrorController $errorController,)
 
 process (ServerRequestInterface $request, RequestHandlerInterface $handler)
 

Private Member Functions

 prepareConditionMatcherVariables (ServerRequestInterface $request)
 
 createPageCacheIdentifier (ServerRequestInterface $request, FrontendTypoScript $frontendTypoScript)
 

Detailed Description

Initialize TypoScript, get page content from cache if possible, lock rendering if needed and create more TypoScript data if needed.

this middleware might get removed later.

Definition at line 48 of file PrepareTypoScriptFrontendRendering.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Frontend\Middleware\PrepareTypoScriptFrontendRendering::__construct ( private EventDispatcherInterface  $eventDispatcher,
private FrontendTypoScriptFactory  $frontendTypoScriptFactory,
# private PhpFrontend  $typoScriptCache[Autowire(service:'cache.typoscript')],
# private FrontendInterface  $pageCache[Autowire(service:'cache.pages')],
private ResourceMutex  $lock,
private Context  $context,
private LoggerInterface  $logger,
private ErrorController  $errorController 
)

Definition at line 50 of file PrepareTypoScriptFrontendRendering.php.

Member Function Documentation

◆ createPageCacheIdentifier()

TYPO3\CMS\Frontend\Middleware\PrepareTypoScriptFrontendRendering::createPageCacheIdentifier ( ServerRequestInterface  $request,
FrontendTypoScript  $frontendTypoScript 
)
private

This creates a hash used as page cache entry identifier and as page generation lock. When multiple requests try to render the same page that will result in the same page cache entry, this lock allows creation by one request which typically puts the result into page cache, while the other requests wait until this finished and re-use the result.

Definition at line 212 of file PrepareTypoScriptFrontendRendering.php.

References TYPO3\CMS\Core\Utility\HttpUtility\buildQueryString(), TYPO3\CMS\Core\TypoScript\FrontendTypoScript\getSettingsConditionList(), and TYPO3\CMS\Core\TypoScript\FrontendTypoScript\getSetupConditionList().

Referenced by TYPO3\CMS\Frontend\Middleware\PrepareTypoScriptFrontendRendering\process().

◆ prepareConditionMatcherVariables()

TYPO3\CMS\Frontend\Middleware\PrepareTypoScriptFrontendRendering::prepareConditionMatcherVariables ( ServerRequestInterface  $request)
private

Data available in TypoScript "condition" matching.

Definition at line 188 of file PrepareTypoScriptFrontendRendering.php.

Referenced by TYPO3\CMS\Frontend\Middleware\PrepareTypoScriptFrontendRendering\process().

◆ process()