From 47520511f4947a6ebd139a84e831a062a5b61c31 Mon Sep 17 00:00:00 2001
From: linawolf <112@linawolf.de>
Date: Sat, 9 Jul 2022 13:19:50 +0200
Subject: [PATCH] [DOCS] Improve changelog for #97454 - new LinkHandler events
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- mention the methods of the removed hook to make it easier
  for developers to search for them.
- add missing description of the ModifyAllowedItemsEvent

Releases: main
Resolves: #97881
Related: #97454
Change-Id: I3667514d8d6b6ef1865e161d77ce18ec2999cca8
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75081
Tested-by: Nikita Hovratov <nikita.h@live.de>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Lina Wolf <112@linawolf.de>
Reviewed-by: Nikita Hovratov <nikita.h@live.de>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Lina Wolf <112@linawolf.de>
---
 .../Breaking-97454-RemoveLinkBrowserHooks.rst | 14 +++++++++--
 ...454-PSR14EventsForLinkBrowserLifecycle.rst | 23 +++++++++++++++----
 2 files changed, 31 insertions(+), 6 deletions(-)

diff --git a/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-97454-RemoveLinkBrowserHooks.rst b/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-97454-RemoveLinkBrowserHooks.rst
index 3b01c8cbfc17..ff94c8d4dd42 100644
--- a/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-97454-RemoveLinkBrowserHooks.rst
+++ b/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-97454-RemoveLinkBrowserHooks.rst
@@ -1,5 +1,7 @@
 .. include:: /Includes.rst.txt
 
+.. _breaking-97454-1657327622:
+
 =============================================
 Breaking: #97454 - Removed Link Browser hooks
 =============================================
@@ -9,10 +11,18 @@ See :issue:`97454`
 Description
 ===========
 
-The hooks array :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['LinkBrowser']['hooks']` has been
-removed in favor of new PSR-14 Events :php:`\TYPO3\CMS\Recordlist\Event\ModifyLinkHandlersEvent`
+The hook :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['LinkBrowser']['hooks']`
+with its two functions :php:`modifyLinkHandlers()` and
+:php:`modifyAllowedItems()` has been removed in favor of two new PSR-14 Events
+:php:`\TYPO3\CMS\Recordlist\Event\ModifyLinkHandlersEvent`
 and :php:`\TYPO3\CMS\Recordlist\Event\ModifyAllowedItemsEvent`.
 
+.. seealso::
+    *   :ref:`feature-97454-1657327622`
+    *   :ref:`t3coreapi:modifyLinkHandlers`
+    *   :ref:`t3coreapi:ModifyLinkHandlersEvent`
+    *   :ref:`t3coreapi:ModifyAllowedItemsEvent`
+
 Impact
 ======
 
diff --git a/typo3/sysext/core/Documentation/Changelog/12.0/Feature-97454-PSR14EventsForLinkBrowserLifecycle.rst b/typo3/sysext/core/Documentation/Changelog/12.0/Feature-97454-PSR14EventsForLinkBrowserLifecycle.rst
index 1e0fdddc3bc2..53c8f022d586 100644
--- a/typo3/sysext/core/Documentation/Changelog/12.0/Feature-97454-PSR14EventsForLinkBrowserLifecycle.rst
+++ b/typo3/sysext/core/Documentation/Changelog/12.0/Feature-97454-PSR14EventsForLinkBrowserLifecycle.rst
@@ -1,5 +1,7 @@
 .. include:: /Includes.rst.txt
 
+.. _feature-97454-1657327622:
+
 ===================================================================
 Feature: #97454 - PSR-14 Events for modifying link browser behavior
 ===================================================================
@@ -11,11 +13,24 @@ Description
 
 Two new PSR-14 Events :php:`\TYPO3\CMS\Recordlist\Event\ModifyLinkHandlersEvent` and
 :php:`\TYPO3\CMS\Recordlist\Event\ModifyAllowedItemsEvent` have been introduced which
-serves as a direct replacement for the now removed
-:php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['LinkBrowser']['hooks']` array.
+serve as a direct replacement for the now removed
+:php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['LinkBrowser']['hooks']`
 :doc:`hooks <../12.0/Breaking-97454-RemoveLinkBrowserHooks>`.
-The first is triggered before link handlers are executed, allowing listeners
-to modify the set of handlers that will be used.  The second
+
+The :php:`ModifyLinkHandlersEvent` is triggered before link handlers are
+executed, allowing listeners to modify the set of handlers that will be used.
+It is the direct replacement for the method :php:`modifyLinkHandlers()` in the
+LinkBrowser hook.
+
+The :php:`ModifyAllowedItemsEvent` can be used to dynamically modify the
+allowed link types. It is the direct replacement for the method :php:`modifyAllowedItems()`
+in the LinkBrowser hook.
+
+.. seealso::
+    *   :ref:`breaking-97454-1657327622`
+    *   :ref:`t3coreapi:modifyLinkHandlers`
+    *   :ref:`t3coreapi:ModifyLinkHandlersEvent`
+    *   :ref:`t3coreapi:ModifyAllowedItemsEvent`
 
 
 Example
-- 
GitLab