AfterGetDataResolvedEvent

New in version 13.0

The PSR-14 event \TYPO3\CMS\Frontend\ContentObject\Event\AfterGetDataResolvedEvent is being dispatched just before ContentObjectRenderer->getData() is about to return the resolved "data".

Example

EXT:my_extension/Classes/Frontend/EventListener/MyEventListener.php
<?php

declare(strict_types=1);

namespace MyVendor\MyExtension\Frontend\EventListener;

use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Frontend\ContentObject\Event\AfterGetDataResolvedEvent;

#[AsEventListener(
    identifier: 'my-extension/my-event-listener',
)]
final readonly class MyEventListener
{
    public function __invoke(AfterGetDataResolvedEvent $event): void
    {
        $event->setResult('modified-result');
    }
}
Copied!

New in version 13.0

API

class AfterGetDataResolvedEvent
Fully qualified name
\TYPO3\CMS\Frontend\ContentObject\Event\AfterGetDataResolvedEvent

Listeners are able to modify the resolved ContentObjectRenderer->getData() result

getResult ( )
Returns
?mixed
setResult ( ?mixed $result)
param $result

the result

getParameterString ( )
Returns
string
getAlternativeFieldArray ( )
Returns
array
getContentObjectRenderer ( )
Returns
\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer