Feature: #96806 - PSR-14 event for modifying button bar

See forge#96806

Description

A new PSR-14 event \TYPO3\CMS\Backend\Template\Components\ModifyButtonBarEvent has been introduced. It serves as a direct replacement for the now removed hook $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['Backend\Template\Components\ButtonBar']['getButtonsHook'].

It can be used to modify the button bar in the TYPO3 backend module docheader.

Example

Registration of the event in your extension's Services.yaml:

MyVendor\MyPackage\Frontend\MyEventListener:
  tags:
    - name: event.listener
      identifier: 'my-package/frontend/modify-button-bar'

The corresponding event listener class:

use TYPO3\CMS\Backend\Template\Components\ModifyButtonBarEvent;

class MyEventListener {

    public function __invoke(ModifyButtonBarEvent $event): void
    {
        // Do your magic here
    }
}

Impact

It's now possible to modify the TYPO3 backend button bar, using the new PSR-14 event.