ModifyLoadedPageTsConfigEvent
Extensions can modify page TSconfig entries that can be overridden or added, based on the root line.
Changed in version 12.2
The event has moved its namespace from
\TYPO3\
to
\TYPO3\
.
Apart from that no changes were made. TYPO3 v12 triggers both the old
and the new event, and TYPO3 v13 stopped calling the old event.
Example
<?php
declare(strict_types=1);
namespace MyVendor\MyExtension\Configuration\EventListener;
use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Core\TypoScript\IncludeTree\Event\ModifyLoadedPageTsConfigEvent;
#[AsEventListener(
identifier: 'my-extension/configuration/loader',
)]
final readonly class MyEventListener
{
public function __invoke(ModifyLoadedPageTsConfigEvent $event): void
{
// ... your logic
}
}