-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] #98443 - Extension recordlist merged into backend (#2234)
* [TASK] #98443 - Extension recordlist merged into backend Related: TYPO3-Documentation/Changelog-To-Doc#191 * Adjust link handlers * Adjust testing * Remove recordlist from composer.json
- Loading branch information
1 parent
c32dbdc
commit 28b63cd
Showing
29 changed files
with
370 additions
and
324 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
Documentation/ApiOverview/Events/Events/Backend/ModifyAllowedItemsEvent.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
.. include:: /Includes.rst.txt | ||
.. index:: Events; ModifyAllowedItemsEvent | ||
.. _ModifyAllowedItemsEvent: | ||
|
||
|
||
======================= | ||
ModifyAllowedItemsEvent | ||
======================= | ||
|
||
.. versionadded:: 12.0 | ||
This event has been introduced together with | ||
:ref:`ModifyLinkHandlersEvent` to | ||
serve as a direct replacement for the following removed hook: | ||
|
||
* :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['LinkBrowser']['hooks']` | ||
|
||
It replaces the method :php:`modifyAllowedItems()` in this hook. | ||
|
||
The event allows extensions to add or remove from the list of allowed link | ||
types. | ||
|
||
.. seealso:: | ||
|
||
* :ref:`modifyLinkHandlers` | ||
* :ref:`ModifyLinkHandlersEvent` | ||
|
||
Example | ||
======= | ||
|
||
Registration of the event in your extension's :file:`Services.yaml`: | ||
|
||
.. code-block:: yaml | ||
:caption: EXT:my_extension/Configuration/Services.yaml | ||
Vendor\MyExtension\Backend\MyEventListener: | ||
tags: | ||
- name: event.listener | ||
identifier: 'my-extension/backend/allowed-items' | ||
The corresponding event listener class: | ||
|
||
.. code-block:: php | ||
:caption: EXT:my_extension/Classes/Backend/MyEventListener.php | ||
TYPO3\CMS\Backend\Controller\Event\ModifyAllowedItemsEvent; | ||
final class MyEventListener | ||
{ | ||
public function __invoke(ModifyAllowedItemsEvent $event): void | ||
{ | ||
$event->addAllowedItem('someItem'); | ||
$event->removeAllowedItem('anotherItem'); | ||
} | ||
} | ||
API | ||
=== | ||
|
||
.. include:: /CodeSnippets/Events/Backend/ModifyAllowedItemsEvent.rst.txt |
60 changes: 60 additions & 0 deletions
60
Documentation/ApiOverview/Events/Events/Backend/ModifyLinkHandlersEvent.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
.. include:: /Includes.rst.txt | ||
.. index:: Events; ModifyLinkHandlersEvent | ||
.. _ModifyLinkHandlersEvent: | ||
|
||
|
||
======================= | ||
ModifyLinkHandlersEvent | ||
======================= | ||
|
||
.. versionadded:: 12.0 | ||
This event has been introduced together with | ||
:ref:`ModifyAllowedItemsEvent` to | ||
serve as a direct replacement for the following removed hook: | ||
|
||
* :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['LinkBrowser']['hooks']` | ||
|
||
It replaces the method :php:`modifyLinkHandlers()` in this hook. | ||
|
||
The event is triggered before link handlers are executed, allowing listeners | ||
to modify the set of handlers that will be used. | ||
|
||
.. seealso:: | ||
* :ref:`modifyLinkHandlers` | ||
* :ref:`ModifyAllowedItemsEvent` | ||
|
||
Example | ||
======= | ||
|
||
Registration of the event in your extension's :file:`Services.yaml`: | ||
|
||
.. code-block:: yaml | ||
:caption: EXT:my_extension/Configuration/Services.yaml | ||
Vendor\MyExtension\Backend\MyEventListener: | ||
tags: | ||
- name: event.listener | ||
identifier: 'my-extension/backend/link-handlers' | ||
The corresponding event listener class: | ||
|
||
.. code-block:: php | ||
:caption: EXT:my_extension/Classes/Backend/MyEventListener.php | ||
use TYPO3\CMS\Backend\Controller\Event\ModifyLinkHandlersEvent; | ||
final class MyEventListener | ||
{ | ||
public function __invoke(ModifyLinkHandlersEvent $event): void | ||
{ | ||
$handler = $event->getHandler('url.'); | ||
$handler['label'] = 'My custom label'; | ||
$event->setHandler('url.', $handler); | ||
} | ||
} | ||
API | ||
=== | ||
|
||
.. include:: /CodeSnippets/Events/Backend/ModifyLinkHandlersEvent.rst.txt |
32 changes: 32 additions & 0 deletions
32
...tation/ApiOverview/Events/Events/Backend/ModifyRecordListHeaderColumnsEvent.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.. include:: /Includes.rst.txt | ||
.. index:: Events; ModifyRecordListHeaderColumnsEvent | ||
.. _ModifyRecordListHeaderColumnsEvent: | ||
|
||
|
||
================================== | ||
ModifyRecordListHeaderColumnsEvent | ||
================================== | ||
|
||
.. versionadded:: 11.4 | ||
|
||
.. versionchanged:: 12.0 | ||
Due to the integration of EXT:recordlist into EXT:backend the namespace of | ||
the event changed from | ||
:php:`TYPO3\CMS\Recordlist\Event\ModifyRecordListHeaderColumnsEvent` | ||
to | ||
:php:`TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListHeaderColumnsEvent`. | ||
For TYPO3 v12 the moved class is available as an alias under the old | ||
namespace to allow extensions to be compatible with TYPO3 v11 and v12. | ||
|
||
|
||
An event to modify the header columns for a table in the record list. | ||
|
||
Usage | ||
===== | ||
|
||
See :ref:`combined usage example <ModifyRecordListTableActionsEvent-usage>`. | ||
|
||
API | ||
=== | ||
|
||
.. include:: /CodeSnippets/Events/Backend/ModifyRecordListHeaderColumnsEvent.rst.txt |
33 changes: 33 additions & 0 deletions
33
...tation/ApiOverview/Events/Events/Backend/ModifyRecordListRecordActionsEvent.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.. include:: /Includes.rst.txt | ||
.. index:: Events; ModifyRecordListHeaderColumnsEvent | ||
.. _ModifyRecordListRecordActionsEvent: | ||
|
||
|
||
================================== | ||
ModifyRecordListRecordActionsEvent | ||
================================== | ||
|
||
.. versionadded:: 11.4 | ||
|
||
.. versionchanged:: 12.0 | ||
Due to the integration of EXT:recordlist into EXT:backend the namespace of | ||
the event changed from | ||
:php:`TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent` | ||
to | ||
:php:`TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListRecordActionsEvent`. | ||
For TYPO3 v12 the moved class is available as an alias under the old | ||
namespace to allow extensions to be compatible with TYPO3 v11 and v12. | ||
|
||
An event to modify the displayed record actions (for example | ||
:guilabel:`edit`, :guilabel:`copy`, :guilabel:`delete`) for a table in | ||
the record list. | ||
|
||
Usage | ||
===== | ||
|
||
See :ref:`combined usage example <ModifyRecordListTableActionsEvent-usage>`. | ||
|
||
API | ||
=== | ||
|
||
.. include:: /CodeSnippets/Events/Backend/ModifyRecordListRecordActionsEvent.rst.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
.../ApiOverview/Events/Events/Backend/RenderAdditionalContentToRecordListEvent.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.. include:: /Includes.rst.txt | ||
.. index:: Events; RenderAdditionalContentToRecordListEvent | ||
.. _RenderAdditionalContentToRecordListEvent: | ||
|
||
|
||
======================================== | ||
RenderAdditionalContentToRecordListEvent | ||
======================================== | ||
|
||
.. versionadded:: 11.0 | ||
|
||
.. versionchanged:: 12.0 | ||
Due to the integration of EXT:recordlist into EXT:backend the namespace of | ||
the event changed from | ||
:php:`TYPO3\CMS\Recordlist\Event\RenderAdditionalContentToRecordListEvent` | ||
to | ||
:php:`TYPO3\CMS\Backend\Controller\Event\RenderAdditionalContentToRecordListEvent`. | ||
For TYPO3 v12 the moved class is available as an alias under the old | ||
namespace to allow extensions to be compatible with TYPO3 v11 and v12. | ||
|
||
Event to add content before or after the main content of the list module. | ||
|
||
|
||
API | ||
--- | ||
|
||
.. include:: /CodeSnippets/Events/Backend/RenderAdditionalContentToRecordListEvent.rst.txt |
19 changes: 0 additions & 19 deletions
19
Documentation/ApiOverview/Events/Events/Recordlist/Index.rst
This file was deleted.
Oops, something went wrong.
60 changes: 0 additions & 60 deletions
60
Documentation/ApiOverview/Events/Events/Recordlist/ModifyAllowedItemsEvent.rst
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.