---
title: "Feature: #102855 - PSR-14 event for modifying resolved link result data"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-102855-1705568085"
source: "Changelog/13.0/Feature-102855-PSR-14EventForModifyingResolvedLinkResultData.rst"
typo3-version: "13.0"
typo3-major: 13
type: "feature"
issue: 102855
forge: "https://forge.typo3.org/issues/102855"
tags: ["PHP-API", "ext:core"]
rendered: "2026-09-20T18:31:11+00:00"
---

# Feature: #102855 - PSR-14 event for modifying resolved link result data {#feature-102855-1705568085}

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

## Description {#description}

A new PSR-14 event `\TYPO3\CMS\Core\LinkHandling\Event\AfterLinkResolvedByStringRepresentationEvent`
has been introduced which serves as a more powerful replacement for the now removed
hook `$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['Link']['resolveByStringRepresentation']`.

The event is being dispatched after `LinkService` has tried to resolve a
given `$urn` using defined link handlers. This means, the new event is
always dispatched, even if a handler successfully resolved the `$urn`
and also even in cases, TYPO3 would have thrown the
`UnknownLinkHandlerException` exception.

Therefore, the new event can not only be used to resolve custom link types
but also to modify the link result data of existing link handlers and
can additionally also be used to resolve situations where no handler could be
found for a `t3://` URN.

The event features the following methods:

-   `getResult()` \- Returns the resolved link result data
-   `setResult()` \- Allows to modify the final link result data
-   `getUrn()` \- Returns the link parameter (URN) to be resolved
-   `getResolveException()` \- Returns the exception, which will be thrown in case no link type has been resolved

## Example {#example}

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

```php
use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Core\LinkHandling\Event\AfterLinkResolvedByStringRepresentationEvent;

final class AfterLinkResolvedByStringRepresentationEventListener
{
    #[AsEventListener]
    public function __invoke(AfterLinkResolvedByStringRepresentationEvent $event): void
    {
        if (str_contains($event->getUrn(), 'myhandler://123')) {
            $event->setResult([
                'type' => 'my-type',
            ]);
        }
    }
}
```

## Impact {#impact}

Using the new PSR-14 event, it's now possible to fully modify the resolved
link result data from `LinkService->resolveByStringRepresentation()`,
just before the result is being returned. Therefore, even the resolved data
of existing handlers can be manipulated.
