ModifyRecordOverlayIconIdentifierEvent¶
New in version 13.0
This PSR-14 event has been introduced, serving as a more flexible
replacement for the removed hook
$GLOBALS
.
The PSR-14 event \TYPO3\
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¶
<?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');
}
}
}
New in version 13.0
The PHP attribute \TYPO3\
has been
introduced to tag a PHP class as an event listener. Alternatively, you can also
register an event listener via the Configuration/
file. Have
a look into the section Implementing an event listener in your extension.
API¶
- class ModifyRecordOverlayIconIdentifierEvent ¶
-
- Fully qualified name
-
\TYPO3\
CMS\ Core\ Imaging\ Event\ Modify Record Overlay Icon Identifier Event
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