Feature: #101603 - PSR-14 event for modifying record overlay icon identifier
See forge#101603
Description
A new PSR-14 event \TYPO3\
has been introduced which serves as a direct replacement for the now removed
$GLOBALS
hook.
To modify the overlay icon identifier, the following methods are available:
set
: Allows to set the overlay icon identifierOverlay Icon Identifier () get
: Returns the overlay icon identifierOverlay Icon Identifier () get
: Returns the record's table nameTable () get
: Returns the record's database rowRow () get
: Returns the record's visibility statusStatus ()
Example
The corresponding event listener class:
<?php
namespace Vendor\MyPackage\Core\EventListener;
use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Core\Imaging\Event\ModifyRecordOverlayIconIdentifierEvent;
final class ModifyRecordOverlayIconIdentifierEventListener
{
#[AsEventListener('my-package/core/modify-record-overlay-icon-identifier')]
public function __invoke(ModifyRecordOverlayIconIdentifierEvent $event): void
{
$event->setOverlayIconIdentifier('my-overlay-icon-identifier');
}
}
Copied!
Impact
It's now possible to modify the overlay icon identifier of any record icon,
using the new PSR-14 event Modify
.