---
title: "Feature: #99323 - PSR-14 event for modifying records after fetching content"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-99323"
source: "Changelog/13.0/Feature-99323-AddModifyRecordsAfterFetchingContentEvent.rst"
modified: "2026-09-15T10:46:36+00:00"
---

# Feature: #99323 - PSR-14 event for modifying records after fetching content

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

## Description

A new PSR-14 event `\TYPO3\CMS\Frontend\ContentObject\Event\ModifyRecordsAfterFetchingContentEvent`
has been introduced which serves as a more powerful replacement for the now
[removed](https://docs.typo3.org/permalink/changelog:breaking-99323-1704980682)
`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content_content.php']['modifyDBRow']`
hook.

The event allows to modify the fetched records next to the possibility to
manipulate most of the options, such as `slide`. Listeners are also able
to set the final content and change the whole TypoScript configuration,
used for further processing.

This can be achieved with the following methods:

-   `getRecords()`
-   `getFinalContent()`
-   `getSlide()`
-   `getSlideCollect()`
-   `getSlideCollectReverse()`
-   `getSlideCollectFuzzy()`
-   `getConfiguration()`
-   `setRecords()`
-   `setFinalContent()`
-   `setSlide()`
-   `setSlideCollect()`
-   `setSlideCollectReverse()`
-   `setSlideCollectFuzzy()`
-   `setConfiguration()`

## Example

The event listener class, using the PHP attribute `#[AsEventListener]` for
registration:

```php
use TYPO3\CMS\Frontend\ContentObject\Event\ModifyRecordsAfterFetchingContentEvent;

final class ModifyRecordsAfterFetchingContentEventListener
{
    #[AsEventListener]
    public function __invoke(ModifyRecordsAfterFetchingContentEvent $event): void
    {
        if ($event->getConfiguration()['table'] !== 'tt_content') {
            return;
        }

        $records = array_reverse($event->getRecords());
        $event->setRecords($records);
    }
}
```

## Impact

Using the new PSR-14 event, it's now possible to modify the records
fetched by the "Content" ContentObject, before they are being further
processed, or even skip TYPO3's default processing of records by setting
an empty array for the records to be rendered.

Additionally, next to the final content, also most of the options and the
whole TypoScript configuration can be modified.
