---
title: "Feature: #101838 - BeforeLoadedUserTsConfigEvent"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-101838-1693834389"
source: "Changelog/13.0/Feature-101838-BeforeLoadedUserTsConfigEvent.rst"
typo3-version: "13.0"
typo3-major: 13
type: "feature"
issue: 101838
forge: "https://forge.typo3.org/issues/101838"
tags: ["Backend", "PHP-API", "TSConfig", "ext:core"]
rendered: "2026-10-03T08:19:36+00:00"
---

# Feature: #101838 - BeforeLoadedUserTsConfigEvent {#feature-101838-1693834389}

See [forge#101838](https://forge.typo3.org/issues/101838)

## Description {#description}

The PSR-14 event `\TYPO3\CMS\Core\TypoScript\IncludeTree\Event\BeforeLoadedUserTsConfigEvent`
can be used to add global static user TSconfig before anything else is loaded.
This is especially useful, if user TSconfig is generated automatically as a
string from a PHP function.

It is important to understand that this config is considered static and thus
should not depend on runtime / request.

### Example {#example}

```php
<?php

namespace Vendor\MyExtension\EventListener;

use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Core\TypoScript\IncludeTree\Event\BeforeLoadedUserTsConfigEvent;

#[AsEventListener(identifier: 'vendor/my-extension/global-usertsconfig')]
final class AddGlobalUserTsConfig
{
    public function __invoke(BeforeLoadedUserTsConfigEvent $event): void
    {
        $event->addTsConfig('global = a global setting');
    }
}
```

## Impact {#impact}

Developers are able to define an event listener which is dispatched before any
other user TSconfig is loaded.
