ModifyRecordOverlayIconIdentifierEvent

New in version 13.0

The PSR-14 event \TYPO3\CMS\Core\Imaging\Event\ModifyRecordOverlayIconIdentifierEvent allows extension authors to modify the overlay icon identifier of any record icon. Extensions can listen to this event and perform necessary modifications to the overlay icon identifier based on their requirements.

Example

EXT:my_extension/Classes/Core/EventListener/ModifyRecordOverlayIconIdentifierEventListener.php
<?php

declare(strict_types=1);

namespace Vendor\MyExtension\Imaging\EventListener;

use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Core\Imaging\Event\ModifyRecordOverlayIconIdentifierEvent;

#[AsEventListener(
    identifier: 'my-extension/imaging/modify-record-overlay-icon-identifier',
)]
final readonly class MyEventListener
{
    public function __invoke(ModifyRecordOverlayIconIdentifierEvent $event): void
    {
        if ($event->getTable() === 'tx_myextension_domain_model_mytable') {
            $event->setOverlayIconIdentifier('my-overlay-icon-identifier');
        }
    }
}
Copied!

New in version 13.0

API

class ModifyRecordOverlayIconIdentifierEvent
Fully qualified name
\TYPO3\CMS\Core\Imaging\Event\ModifyRecordOverlayIconIdentifierEvent

Listeners to this event are able to modify the overlay icon identifier of any record icon

setOverlayIconIdentifier ( string $overlayIconIdentifier)
param $overlayIconIdentifier

the overlayIconIdentifier

getOverlayIconIdentifier ( )
Returns
string
getTable ( )
Returns
string
getRow ( )
Returns
array
getStatus ( )
Returns
array