ModifyLoadedPageTsConfigEvent

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

Changed in version 12.2

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

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