Action

Read onlyYes

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
Internal

Table of Contents

Properties

$configuration  : array<string|int, mixed>
$iconIdentifier  : string
$labelKey  : string
$name  : string

Methods

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

Properties

$configuration

protected array<string|int, mixed> $configuration

$iconIdentifier

protected string $iconIdentifier

Methods

__construct()

public __construct(string $name, array<string|int, mixed> $configuration, string $iconIdentifier, string $labelKey) : mixed
Parameters
$name : string
$configuration : array<string|int, mixed>
$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

Search results