---
title: "Feature: #104832 - PSR-14 Event to alter the results of PageTreeRepository"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-104832-1725537890"
source: "Changelog/13.3/Feature-104832-PSR-14EventToAlterTheResultsOfPageTreeRepository.rst"
typo3-version: "13.3"
typo3-major: 13
type: "feature"
issue: 104832
forge: "https://forge.typo3.org/issues/104832"
tags: ["Backend", "PHP-API", "ext:backend"]
rendered: "2026-10-03T08:19:36+00:00"
---

# Feature: #104832 - PSR-14 Event to alter the results of PageTreeRepository {#feature-104832-1725537890}

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

## Description {#description}

Until TYPO3 v9, it was possible to alter the rendering of one of TYPO3's
superpowers — the page tree in the TYPO3 Backend User Interface.

This was done via a "Hook", but was removed due to the migration towards an
SVG-based tree rendering.

As the Page Tree Rendering has evolved, and the hook system has been replaced
in favor of PSR-14 Events, a new event `\TYPO3\CMS\Backend\Tree\Repository\AfterRawPageRowPreparedEvent`
has been introduced.

## Example {#example}

The event listener class, using the PHP attribute `#[AsEventListener]` for
registration, will remove any children for displaying for the page with the
UID 123:

```php
use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Backend\Tree\Repository\AfterRawPageRowPreparedEvent;

final class MyEventListener
{
    #[AsEventListener]
    public function __invoke(AfterRawPageRowPreparedEvent $event): void
    {
        $rawPage = $event->getRawPage();
        if ((int)$rawPage['uid'] === 123) {
            $rawPage['_children'] = [];
            $event->setRawPage($rawPage);
        }
    }
}
```

## Impact {#impact}

Using the new PSR-14 event, it is now possible to modify the populated
`page` properties or its children records.
