Action

readonly class \TYPO3\CMS\Backend\Template\Components\MultiRecordSelection\Action

Defines a bulk action that can be performed on multiple selected records in the backend.

These actions appear when users select multiple records in list views or other record listings, allowing operations like mass delete, mass edit, etc.

Actions are readonly DTOs that encapsulate the configuration, icon, and label for a multi-record operation.

Example:

$action = new Action(
    name: 'delete',
    configuration: ['action' => 'deleteRecords'],
    iconIdentifier: 'actions-delete',
    labelKey: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.delete'
);

// The action provides formatted output for rendering
$actionName = $action->getName();           // 'delete'
$jsonConfig = $action->getConfiguration();  // JSON-encoded for HTML attributes
$label = $action->getLabel();               // Translated label
$icon = $action->getIcon();                 // Rendered icon HTML

Table of Contents

Properties

$configuration  : array
$iconIdentifier  : string
$labelKey  : string
$name  : string

Methods

__construct()  : mixed
getConfiguration()  : string
getIcon()  : string
getLabel()  : string
getName()  : string
getLanguageService()  : LanguageService

Properties

$configuration

protected array $configuration

$iconIdentifier

protected string $iconIdentifier

Methods

__construct()

public __construct(string $name, array $configuration, string $iconIdentifier, string $labelKey) : mixed

Parameters

$name : string
$configuration : array
$iconIdentifier : string
$labelKey : string

getConfiguration()

public getConfiguration() : string

Return values

string

getIcon()

public getIcon() : string

Return values

string

getLabel()

public getLabel() : string

Return values

string

getName()

public getName() : string

Return values

string
On this page