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\CMS\Core\Configuration\Event\ModifyLoadedPageTsConfigEvent to \TYPO3\CMS\Core\TypoScript\IncludeTree\Event\ModifyLoadedPageTsConfigEvent . 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 

EXT:my_extension/Classes/Configuration/EventListener/MyEventListener.php
<?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
  }
}
Copied!

API 

final class ModifyLoadedPageTsConfigEvent
Fully qualified name
\TYPO3\CMS\Core\TypoScript\IncludeTree\Event\ModifyLoadedPageTsConfigEvent

Extensions can modify page TSconfig entries that can be overridden or added, based on the root line

getTsConfig()
Returns
array
addTsConfig(string $tsConfig)
param $tsConfig

the tsConfig

setTsConfig(array $tsConfig)
param $tsConfig

the tsConfig

getRootLine()
Returns
array