[!!!][FEATURE] Add PSR-14 Event to modify link resolving result data
This introduces the new PSR-14 `AfterLinkResolvedByStringRepresentationEvent`, enabling extension authors to modify the resolved link result data. The event is dispatched by `LinkService->resolveByStringRepresentation()` after existing handlers have been executed. Therefore, in contrast to the previously available hook `$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['Link']['resolveByStringRepresentation']` does the new event allow to even modify the resolved link result data of the existing handlers and also cases where the `UnknownLinkHandlerException` would have been thrown. The corresponding exception is also added to the event to provide as much information as possible. Resolves: #102855 Releases: main Change-Id: I3e702e3540c510dc4d03f5cc710dc204a505e9ed Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82506 Reviewed-by:Andreas Kienast <a.fernandez@scripting-base.de> Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Andreas Kienast <a.fernandez@scripting-base.de> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- Build/phpstan/phpstan-baseline.neon 0 additions, 10 deletionsBuild/phpstan/phpstan-baseline.neon
- typo3/sysext/core/Classes/LinkHandling/Event/AfterLinkResolvedByStringRepresentationEvent.php 52 additions, 0 deletions...ng/Event/AfterLinkResolvedByStringRepresentationEvent.php
- typo3/sysext/core/Classes/LinkHandling/LinkService.php 53 additions, 39 deletionstypo3/sysext/core/Classes/LinkHandling/LinkService.php
- typo3/sysext/core/Documentation/Changelog/13.0/Breaking-102855-RemovedLinkServiceResolveByStringRepresentationHook.rst 41 additions, 0 deletions...5-RemovedLinkServiceResolveByStringRepresentationHook.rst
- typo3/sysext/core/Documentation/Changelog/13.0/Feature-102855-PSR-14EventForModifyingResolvedLinkResultData.rst 68 additions, 0 deletions...-102855-PSR-14EventForModifyingResolvedLinkResultData.rst
- typo3/sysext/core/Tests/Unit/DataHandling/SoftReference/TypoLinkSoftReferenceParserTest.php 2 additions, 0 deletions...andling/SoftReference/TypoLinkSoftReferenceParserTest.php
- typo3/sysext/core/Tests/Unit/DataHandling/SoftReference/TypoLinkTagSoftReferenceParserTest.php 11 additions, 0 deletions...ling/SoftReference/TypoLinkTagSoftReferenceParserTest.php
- typo3/sysext/core/Tests/Unit/LinkHandling/Event/AfterLinkResolvedByStringRepresentationEventTest.php 74 additions, 0 deletions...vent/AfterLinkResolvedByStringRepresentationEventTest.php
- typo3/sysext/core/Tests/Unit/LinkHandling/LinkServiceTest.php 76 additions, 0 deletions...3/sysext/core/Tests/Unit/LinkHandling/LinkServiceTest.php
- typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php 6 additions, 0 deletions...figuration/ExtensionScanner/Php/ArrayDimensionMatcher.php
Please register or sign in to comment