Feature: #95083 - New PSR-14 ModifyClearCacheActionsEvent
See forge#95083
Description
A new PSR-14 event \TYPO3\
has been added to TYPO3 Core. This event is fired in the
\TYPO3\
class and allows extensions to modify the clear cache actions, shown
in the TYPO3 Backend top toolbar.
The event can be used to change or remove existing clear cache
actions, as well as to add new actions. Therefore the event also
contains, next to the usual "getter" and "setter", the convenience
method add
for the cache
and
cache
arrays.
Registration of the Event in your extensions' Services.
:
MyVendor\MyPackage\Toolbar\MyEventListener:
tags:
- name: event.listener
identifier: 'my-package/toolbar/my-event-listener'
The corresponding event listener class:
use TYPO3\CMS\Backend\Backend\Event\ModifyClearCacheActionsEvent;
class MyEventListener {
public function __invoke(ModifyClearCacheActionsEvent $event): void
{
// do magic here
}
}
Impact
This event can be used to modify the clear cache actions, shown in the TYPO3 Backend top toolbar.