[FEATURE] Add two PSR-14 events around auto create redirects
With #91776 auto-created redirects have been stored with a pid of the page, which the slug has been changed. This was streamlined and changed to use the site rootPageId instead with #99044, which reverted the original use-case. This change implements two new PSR-14 events around each auto-create-redirect: * `ModifyAutoCreateRedirectRecordBeforePersistingEvent`: can be used to modify the redirect record before it is persisted * `AfterAutoCreateRedirectHasBeenPersistedEvent`: can be used to chain further task after the redirect has been persisted to the database. It's kind of a plain notification event. Resolves: #99834 Related: #99802 Related: #99044 Related: #91776 Releases: main Change-Id: I974020b148a3b5eb109624648016a79ed557af3e Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76539 Tested-by:core-ci <typo3@b13.com> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Sybille Peters <sypets@gmx.de> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/core/Documentation/Changelog/12.3/Feature-99834-NewPSR-14AfterAutoCreateRedirectHasBeenPersistedEvent.rst 74 additions, 0 deletions...NewPSR-14AfterAutoCreateRedirectHasBeenPersistedEvent.rst
- typo3/sysext/core/Documentation/Changelog/12.3/Feature-99834-NewPSR-14ModifyAutoCreateRedirectRecordBeforePersistingEvent.rst 85 additions, 0 deletions...14ModifyAutoCreateRedirectRecordBeforePersistingEvent.rst
- typo3/sysext/redirects/Classes/Event/AfterAutoCreateRedirectHasBeenPersistedEvent.php 54 additions, 0 deletions...es/Event/AfterAutoCreateRedirectHasBeenPersistedEvent.php
- typo3/sysext/redirects/Classes/Event/ModifyAutoCreateRedirectRecordBeforePersistingEvent.php 59 additions, 0 deletions...t/ModifyAutoCreateRedirectRecordBeforePersistingEvent.php
- typo3/sysext/redirects/Classes/Service/SlugService.php 19 additions, 2 deletionstypo3/sysext/redirects/Classes/Service/SlugService.php
- typo3/sysext/redirects/Tests/Functional/Service/Fixtures/SlugServiceTest_AfterAutoCreateRedirectHasBeenPersistedEvent.csv 4 additions, 0 deletions...viceTest_AfterAutoCreateRedirectHasBeenPersistedEvent.csv
- typo3/sysext/redirects/Tests/Functional/Service/Fixtures/SlugServiceTest_ModifyAutoCreateRedirectRecordBeforePersistingEvent.csv 4 additions, 0 deletions...t_ModifyAutoCreateRedirectRecordBeforePersistingEvent.csv
- typo3/sysext/redirects/Tests/Functional/Service/SlugServiceTest.php 119 additions, 7 deletions...xt/redirects/Tests/Functional/Service/SlugServiceTest.php
- typo3/sysext/redirects/Tests/Unit/Event/AfterAutoCreateRedirectHasBeenPersistedEventTest.php 61 additions, 0 deletions...vent/AfterAutoCreateRedirectHasBeenPersistedEventTest.php
- typo3/sysext/redirects/Tests/Unit/Event/ModifyAutoCreateRedirectRecordBeforePersistingEventTest.php 97 additions, 0 deletions...difyAutoCreateRedirectRecordBeforePersistingEventTest.php
Please register or sign in to comment