From 4451f6dc9d5a86df0ebc37c0fb3aa55e0a0661a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Chris=20M=C3=BCller?= <typo3@krue.ml>
Date: Tue, 28 Mar 2023 10:57:42 +0200
Subject: [PATCH] [DOCS] Add PSR-14 events to redirects documentation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Resolves: #100331
Related: #96147
Related: #99746
Related: #99802
Related: #99803
Related: #99834
Releases: main
Change-Id: Icf6df514510dc3bd45fc824b15085963bda42fe2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78295
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Stefan Bürk <stefan@buerk.tech>
---
 .../redirects/Documentation/Events/Index.rst  | 53 +++++++++++++++++++
 .../sysext/redirects/Documentation/Index.rst  |  1 +
 2 files changed, 54 insertions(+)
 create mode 100644 typo3/sysext/redirects/Documentation/Events/Index.rst

diff --git a/typo3/sysext/redirects/Documentation/Events/Index.rst b/typo3/sysext/redirects/Documentation/Events/Index.rst
new file mode 100644
index 000000000000..86320bf6d80f
--- /dev/null
+++ b/typo3/sysext/redirects/Documentation/Events/Index.rst
@@ -0,0 +1,53 @@
+.. include:: /Includes.rst.txt
+
+.. _psr14events:
+
+=============
+PSR-14 events
+=============
+
+The following PSR-14 events are available to extend the functionality:
+
+
+AfterAutoCreateRedirectHasBeenPersistedEvent
+============================================
+
+React on persisted auto-created redirects.
+:ref:`More details <t3coreapi:AfterAutoCreateRedirectHasBeenPersistedEvent>`
+
+
+BeforeRedirectMatchDomainEvent
+==============================
+
+Implement a custom redirect matching upon the loaded redirects or return a
+matched redirect record from other sources.
+:ref:`More details <t3coreapi:BeforeRedirectMatchDomainEvent>`
+
+
+ModifyAutoCreateRedirectRecordBeforePersistingEvent
+===================================================
+
+Modify the redirect record before it is persisted to the database.
+:ref:`More details <t3coreapi:ModifyAutoCreateRedirectRecordBeforePersistingEvent>`
+
+
+ModifyRedirectManagementControllerViewDataEvent
+===============================================
+
+Modify or enrich view data for the
+:php:`\TYPO3\CMS\Redirects\Controller\ManagementController`.
+:ref:`More details <t3coreapi:ModifyRedirectManagementControllerViewDataEvent>`
+
+
+RedirectWasHitEvent
+===================
+
+Process the matched redirect further and adjust the PSR-7 response.
+:ref:`More details <t3coreapi:RedirectWasHitEvent>`
+
+
+SlugRedirectChangeItemCreatedEvent
+==================================
+
+Manage the redirect sources for which redirects should be created.
+:ref:`More details <t3coreapi:SlugRedirectChangeItemCreatedEvent>`
diff --git a/typo3/sysext/redirects/Documentation/Index.rst b/typo3/sysext/redirects/Documentation/Index.rst
index 443e0cb08c1c..e7456054f084 100644
--- a/typo3/sysext/redirects/Documentation/Index.rst
+++ b/typo3/sysext/redirects/Documentation/Index.rst
@@ -45,6 +45,7 @@ redirects and automatically create redirects on slug changes.
    Setup/Index
    Usage/Index
    BestPractices/Index
+   Events/Index
    KnownProblems/Index
    Basics/Index
 
-- 
GitLab