Deprecation: #92062 - Migrate RecordListController hooks to PSR-14 event
See forge#92062
Description
The following hooks have been marked as deprecated:
$GLOBALS
['TYPO3_ CONF_ VARS'] ['SC_ OPTIONS'] ['recordlist/ Modules/ Recordlist/ index. php'] ['draw Header Hook'] $GLOBALS
['TYPO3_ CONF_ VARS'] ['SC_ OPTIONS'] ['recordlist/ Modules/ Recordlist/ index. php'] ['draw Footer Hook']
Both hooks were used to add content before or after the main content of the list module.
Impact
Using the hooks still works as before, but trigger a PHP
E_
error.
The hooks will be removed and stop working in TYPO3 v12.
Please migrate to the PSR-14 event:
\TYPO3\
.
Affected Installations
TYPO3 installations with extensions that hook into the RecordListController.
Migration
The functionality of both hooks has been migrated to the following PSR-14 event:
\TYPO3\
.
The event class contains the following relevant public methods:
get
Returns the request object from the list module request.Request add
Add additional content as string as it is to be shown above the main content.Content Above add
Add additional content as string as it is to be shown below the main content.Content Below
The event object is used as parameter for the event listener method (default is
__
).
The listener needs to be registered in the extension: EXT:
.
Example:
My\Extension\Provider\MyAdditionalContentProvider:
tags:
- name: event.listener
identifier: 'my-additional-content'
event: TYPO3\CMS\Recordlist\Event\RenderAdditionalContentToRecordListEvent
Please have a look at
\TYPO3\
as an example for the
listener implementation.