Feature: #96975 - New PSR-14 events for SiteConfiguration Handling
See forge#96975
Description
Two new events have been added to TYPO3, to allow manipulation of the loaded SiteConfiguration before it is cached and before the configuration is written to disk.
\TYPO3\
CMS\ Core\ Configuration\ Event\ Site Configuration Before Write Event \TYPO3\
CMS\ Core\ Configuration\ Event\ Site Configuration Loaded Event
Impact
The events SiteConfigurationLoadedEvent and SiteConfigurationBeforeWriteEvent have been introduced.
Both contain the following methods:
get
: returns the sites' identifierSite Identifier () get
: returns the configuration (loaded or to be written)Configuration () set
: allows overwriting of the configurationConfiguration (array $configuration)
They allow modification of the site configuration array both before loading and before writing the configuration to disk.
To register an event listener for the new events, use the following code in your
Services.
:
services:
MyCompany\MyPackage\EventListener\SiteConfigurationLoadedListener:
tags:
- name: event.listener
identifier: 'myLoadedListener'
MyCompany\MyPackage\EventListener\SiteConfigurationBeforeWriteListener:
tags:
- name: event.listener
identifier: 'myWriteListener'
Copied!