‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent Class Reference

Public Member Functions

 __construct (private array $actions, private readonly string $table, private readonly array $recordIds, private readonly DatabaseRecordList $recordList)
 setAction (string $action, string $actionName='', string $before='', string $after='')
 hasAction (string $actionName)
string null getAction (string $actionName)
bool removeAction (string $actionName)
 setActions (array $actions)
 getActions ()
 setNoActionLabel (string $noActionLabel)
 getNoActionLabel ()
 getTable ()
 getRecordIds ()
 getRecordList ()

Private Attributes

string $noActionLabel = ''

Detailed Description

An event to modify the multi record selection actions (e.g. "edit", "copy to clipboard") for a table in the RecordList.

Definition at line 26 of file ModifyRecordListTableActionsEvent.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent::__construct ( private array  $actions,
private readonly string  $table,
private readonly array  $recordIds,
private readonly DatabaseRecordList  $recordList 

Definition at line 37 of file ModifyRecordListTableActionsEvent.php.

Member Function Documentation

◆ getAction()

string null TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent::getAction ( string  $actionName)

Get action by its name

‪string|null The action or NULL if the action does not exist

Definition at line 81 of file ModifyRecordListTableActionsEvent.php.

◆ getActions()

TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent::getActions ( )

Definition at line 106 of file ModifyRecordListTableActionsEvent.php.

◆ getNoActionLabel()

TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent::getNoActionLabel ( )

Get the label, which will be displayed, in case no action is available for the current user. Note: If this returns an empty string, this only means that no other listener set a label before. TYPO3 will always fall back to a default if this remains empty.

Definition at line 123 of file ModifyRecordListTableActionsEvent.php.

References TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent\$noActionLabel.

◆ getRecordIds()

TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent::getRecordIds ( )

Definition at line 133 of file ModifyRecordListTableActionsEvent.php.

◆ getRecordList()

TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent::getRecordList ( )

Returns the current DatabaseRecordList instance.

‪Might be replaced by a DTO in the future

Definition at line 143 of file ModifyRecordListTableActionsEvent.php.

◆ getTable()

TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent::getTable ( )

Definition at line 128 of file ModifyRecordListTableActionsEvent.php.

◆ hasAction()

TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent::hasAction ( string  $actionName)

◆ removeAction()

bool TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent::removeAction ( string  $actionName)

Remove action by its name

‪bool Whether the action could be removed - Will therefore return FALSE if the action to remove does not exist.

Definition at line 92 of file ModifyRecordListTableActionsEvent.php.

◆ setAction()

TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent::setAction ( string  $action,
string  $actionName = '',
string  $before = '',
string  $after = '' 

Add a new action or override an existing one. Latter is only possible, in case $actionName is given. Otherwise, the action will be added with a numeric index, which is generally not recommended. It's also possible to define the position of an action with either the "before" or "after" argument, while their value must be an existing action.

Definition at line 51 of file ModifyRecordListTableActionsEvent.php.

References TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent\hasAction().

◆ setActions()

TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent::setActions ( array  $actions)

Definition at line 101 of file ModifyRecordListTableActionsEvent.php.

◆ setNoActionLabel()

TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent::setNoActionLabel ( string  $noActionLabel)

Member Data Documentation

◆ $noActionLabel

string TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListTableActionsEvent::$noActionLabel = ''