Actions
Task #71362
closedAdd hook to manipulate docHeader buttons when using the ModuleTemplateAPI
Start date:
2015-11-06
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
The "old" backend module rendering knows the $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['docHeaderButtonsHook']
hook so you are able to manipulate the docHeader buttons. This isn't yet implemented in the new ModuleTemplateAPI
Updated by Gerrit Code Review about 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44569
Updated by Frans Saris about 9 years ago
To easily test the hook add next lines to your typo3conf/AdditionalConfiguration.php
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['Backend\Template\Components\ButtonBar']['getButtonsHook']['HookTest'] = function($params, TYPO3\CMS\Backend\Template\Components\ButtonBar $buttonBar) { $buttons = $params['buttons']; // if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('M') === 'web_list') { $iconFactory = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconFactory::class); $button = $buttonBar->makeLinkButton(); $button->setShowLabelText(true); $button->setIcon($iconFactory->getIcon('actions-system-backend-user-emulate', \TYPO3\CMS\Core\Imaging\Icon::SIZE_SMALL)); $button->setTitle('getButtons hook test'); $button->setOnClick('alert("Hook works");return false;'); $buttons[\TYPO3\CMS\Backend\Template\Components\ButtonBar::BUTTON_POSITION_LEFT][1][] = $button; // } return $buttons; };
Updated by Gerrit Code Review about 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44569
Updated by Frans Saris about 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8453d8c8dad3586ee70336d56181b4daf6385fb9.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed
Actions