Add an additional hook to the EXT:recordlist which makes
it possible to add content above any other content.
Resolves: #61170
Releases: master
Change-Id: I2f6ad79cfb5ff19f57da63346735b743947ddf99
Reviewed-on: https://review.typo3.org/55423
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Peter Kraume <peter.kraume@gmx.de>
Tested-by: Peter Kraume <peter.kraume@gmx.de>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
--- /dev/null
+.. include:: ../../Includes.txt
+
+=====================================================
+Feature: #61170 - Add additional hook for record list
+=====================================================
+
+See :issue:`61170`
+
+Description
+===========
+
+An additional hook is added to `EXT:recordlist` to render content above any other content.
+
+Example of usage
+
+.. code-block:: php
+
+ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/db_layout.php']['drawHeaderHook']['sys_note'] = \Vendor\Extkey\Hooks\PageHook::class . '->render';
+
+.. index:: Backend, NotScanned
$title = $this->pageinfo['title'];
}
$this->body = $this->moduleTemplate->header($title);
+
+ // Additional header content
+ foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/Modules/Recordlist/index.php']['drawHeaderHook'] ?? [] as $hook) {
+ $params = [];
+ $this->body .= GeneralUtility::callUserFunction($hook, $params, $this);
+ }
+
$this->moduleTemplate->setTitle($title);
$output = '';