AfterRecordSummaryForLocalizationEvent
New in version 12.0
The PSR-14 event
\TYPO3\
is fired in the
\TYPO3\
class
and allows extensions to modify the payload of the Json
.
Example
Registration of the event listener in the extension's Services.
:
services:
# Place here the default dependency injection configuration
MyVendor\MyExtension\Backend\EventListener\MyEventListener:
tags:
- name: event.listener
identifier: 'my-extension/backend/after-record-summary-for-localization'
Read how to configure dependency injection in extensions.
The corresponding event listener class:
<?php
declare(strict_types=1);
namespace MyVendor\MyExtension\Backend\EventListener;
use TYPO3\CMS\Backend\Controller\Event\AfterRecordSummaryForLocalizationEvent;
final class MyEventListener
{
public function __invoke(AfterRecordSummaryForLocalizationEvent $event): void
{
// Get current records
$records = $event->getRecords();
// ... do something with $records
// Set new records
$event->setRecords($records);
// Get current columns
$columns = $event->getColumns();
// ... do something with $columns
// Set new columns
$event->setColumns($columns);
}
}