ModifyTypoScriptConfigEvent
This event allows listeners to adjust and react on TypoScript 'config'.
This event is dispatched before final TypoScript 'config' is written to cache, and not when a page can be successfully retrieved from cache, which is typically the case in 'page is fully cached' scenarios.
This incoming $configTree has already been merged with the determined PAGE "page.config" TypoScript of the requested 'type' / 'typeNum' and the global TypoScript setup 'config'.
The result of this event is available as Request attribute: $request->getAttribute('frontend.typoscript')->getConfigTree(), and its array variant $request->getAttribute('frontend.typoscript')->getConfigArray().
Registered listener can set a modified setup config AST. Note the TypoScript AST structure is still marked @internal within v13 core and may change later, using the event to write different 'config' data is thus still a bit risky.
Table of Contents
Methods
- __construct() : mixed
- getConfigTree() : RootNode
- getRequest() : ServerRequestInterface
- getSetupTree() : RootNode
- setConfigTree() : void
Methods
__construct()
public
__construct(ServerRequestInterface $request, RootNode $setupTree, RootNode $configTree) : mixed
Parameters
getConfigTree()
public
getConfigTree() : RootNode
Return values
RootNodegetRequest()
public
getRequest() : ServerRequestInterface
Return values
ServerRequestInterfacegetSetupTree()
public
getSetupTree() : RootNode
Return values
RootNodesetConfigTree()
public
setConfigTree(RootNode $configTree) : void
Parameters
- $configTree : RootNode