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

Public Member Functions

 __construct (private array $actions, private readonly string $table, private readonly array $record, private readonly DatabaseRecordList $recordList)
 setAction (string $action, string $actionName='', string $group='', string $before='', string $after='')
 hasAction (string $actionName, string $group='')
 getAction (string $actionName, string $group='')
bool removeAction (string $actionName, string $group='')
 getActionGroup (string $group)
 setActions (array $actions)
 getActions ()
 getTable ()
 getRecord ()
 getRecordList ()

Detailed Description

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

Definition at line 26 of file ModifyRecordListRecordActionsEvent.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 28 of file ModifyRecordListRecordActionsEvent.php.

Member Function Documentation

◆ getAction()

TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListRecordActionsEvent::getAction ( string  $actionName,
string  $group = '' 

Get action by its name. In case the action exists in both groups and non or an invalid $group is provided, the action from the "primary" group will be returned.

Definition at line 94 of file ModifyRecordListRecordActionsEvent.php.

◆ getActionGroup()

TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListRecordActionsEvent::getActionGroup ( string  $group)

Get the actions of a specific group

Definition at line 136 of file ModifyRecordListRecordActionsEvent.php.

◆ getActions()

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

Definition at line 146 of file ModifyRecordListRecordActionsEvent.php.

◆ getRecord()

TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListRecordActionsEvent::getRecord ( )

◆ getRecordList()

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

Returns the current DatabaseRecordList instance.

‪Might be replaced by a DTO in the future

Definition at line 166 of file ModifyRecordListRecordActionsEvent.php.

◆ getTable()

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

Definition at line 151 of file ModifyRecordListRecordActionsEvent.php.

◆ hasAction()

TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListRecordActionsEvent::hasAction ( string  $actionName,
string  $group = '' 

Whether the action exists in the given group. In case non or an invalid $group is provided, both groups will be checked.

Definition at line 80 of file ModifyRecordListRecordActionsEvent.php.

Referenced by TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListRecordActionsEvent\setAction().

◆ removeAction()

bool TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListRecordActionsEvent::removeAction ( string  $actionName,
string  $group = '' 

Remove action by its name. In case the action exists in both groups and non or an invalid $group is provided, the action will be removed from both groups.

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

Definition at line 111 of file ModifyRecordListRecordActionsEvent.php.

◆ setAction()

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

Add a new action or override an existing one. Latter is only possible, in case $columnName is given. Otherwise, the column 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.

Note: In case non or an invalid $group is provided, the new action will be added to the secondary group.


Definition at line 51 of file ModifyRecordListRecordActionsEvent.php.

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

◆ setActions()

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

Definition at line 141 of file ModifyRecordListRecordActionsEvent.php.