AfterTypoScriptDeterminedEvent¶
New in version 13.0
This event can be used to serve as a replacement for the removed
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageLoadedFromCache']
hook. Another solution to substitute the removed hook is an own
middleware after
typo3/cms-frontend/prepare-tsfe-rendering
.
The PSR-14 event \TYPO3\CMS\Frontend\Event\AfterTypoScriptDeterminedEvent
is dispatched after the \TYPO3\CMS\Core\TypoScript\FrontendTypoScript
object has been calculated, just before it is attached to the
request.
The event is designed to enable listeners to act on specific TypoScript conditions. Listeners must not modify TypoScript at this point, the Core will try to actively prevent this.
This event is especially useful when "upper" middlewares that do not have the
determined TypoScript need to behave differently depending on TypoScript
config
that is only created after them.
The Core uses this in the TimeTrackInitialization
and the
WorkspacePreview
middlewares, to determine debugging and preview details.
Note
Both "settings" ("constants") and config
are always set
within the FrontendTypoScript
at this point, even in "fully cached
page" scenarios. setup
and (internal) page
may
not be set.
Example¶
Note
Currently, we do not have an example for this event. If you can provide a useful one, please open an issue with your code snippets or a pull request.
API¶
- class \TYPO3\CMS\Frontend\Event\ AfterTypoScriptDeterminedEvent¶
-
This event is dispatched after the FrontendTypoScript object has been calculated, just before it is attached to the request.
The event is designed to enable listeners to act on specific TypoScript conditions. Listeners must not modify TypoScript at this point, the core will try to actively prevent this.
This event is especially useful when "upper" middlewares that do not have the determined TypoScript need to behave differently depending on TypoScript 'config' that is only created after them. The core uses this in the TimeTrackInitialization and the WorkspacePreview middlewares, to determine debugging and preview details.
Note both 'settings' ("constants") and 'config' are always set within the FrontendTypoScript at this point, even in 'fully cached page' scenarios. 'setup' and (@internal) 'page' may not be set.
- getFrontendTypoScript ( ) ¶
-
- returntype
-
TYPO3\CMS\Core\TypoScript\FrontendTypoScript