sabbelasichon / typo3-rector

Rector for TYPO3
MIT License
231 stars 63 forks source link

Feature: #95077 - New PSR-14 ProcessFileListActionsEvent #4439

Closed simonschaufi closed 3 weeks ago

simonschaufi commented 3 weeks ago

Feature: #95077 - New PSR-14 ProcessFileListActionsEvent

https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.4/Feature-95077-NewPSR-14ProcessFileListActionsEvent.html

Feature: #95077 - New PSR-14 ProcessFileListActionsEvent

See 95077

Description

A new PSR-14 event \TYPO3\CMS\Core\Configuration\Event\ProcessFileListActionsEvent has been added to TYPO3 Core. This event is fired after generating the actions for the files and folders listing in the File > Filelist module.

Registration of the Event in your extensions' Services.yaml:

MyVendor\MyPackage\FileList\MyEventListener:
  tags:
    - name: event.listener
      identifier: 'my-package/filelist/my-event-listener'

The corresponding event listener class:

use TYPO3\CMS\Filelist\Event\ProcessFileListActionsEvent;

class MyEventListener {

    public function __invoke(ProcessFileListActionsEvent $event): void
    {
        // do your magic
    }

}

Impact

This event can be used to manipulate the icons, used for the edit control section in the files and folders listing within the File > Filelist module.

PHP-API, ext:filelist