Skip to content
Snippets Groups Projects
Commit 226a7dae authored by Georg Ringer's avatar Georg Ringer Committed by Oliver Hader
Browse files

[FEATURE] Add drawHeaderHook to EXT:recordlist

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: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarPeter Kraume <peter.kraume@gmx.de>
Tested-by: default avatarPeter Kraume <peter.kraume@gmx.de>
Reviewed-by: default avatarJoerg Boesche <typo3@joergboesche.de>
Tested-by: default avatarJoerg Boesche <typo3@joergboesche.de>
Reviewed-by: default avatarOliver Hader <oliver.hader@typo3.org>
Tested-by: default avatarOliver Hader <oliver.hader@typo3.org>
parent 842ff30b
Branches
Tags
No related merge requests found
.. 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
......@@ -460,6 +460,13 @@ class RecordList
$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 = '';
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment