AfterRecordSummaryForLocalizationEvent

New in version 12.0

The PSR-14 event \TYPO3\CMS\Backend\Controller\Event\AfterRecordSummaryForLocalizationEvent is fired in the \TYPO3\CMS\Backend\Controller\Page\RecordSummaryForLocalization class and allows extensions to modify the payload of the JsonResponse.

Example

Registration of the event listener in the extension's Services.yaml:

EXT:my_extension/Configuration/Services.yaml
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'
Copied!

Read how to configure dependency injection in extensions.

The corresponding event listener class:

EXT:my_extension/Classes/Backend/EventListener/MyEventListener.php
<?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);
    }
}
Copied!

API

class AfterRecordSummaryForLocalizationEvent
Fully qualified name
\TYPO3\CMS\Backend\Controller\Event\AfterRecordSummaryForLocalizationEvent
getColumns ( )
Returns
array
setColumns ( array $columns)
param $columns

the columns

getRecords ( )
Returns
array
setRecords ( array $records)
param $records

the records