ModifyRecordListRecordActionsEvent

New in version 11.4

Changed in version 12.0

Due to the integration of EXT:recordlist into EXT:backend the namespace of the event changed from \TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent to \TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListRecordActionsEvent. For TYPO3 v12 the moved class is available as an alias under the old namespace to allow extensions to be compatible with TYPO3 v11 and v12.

The PSR-14 event \TYPO3\CMS\Backend\RecordList\Event\ModifyRecordListRecordActionsEvent allows to modify the displayed record actions (for example edit, copy, delete) for a table in the record list.

Usage

See combined usage example.

API

class \TYPO3\CMS\Backend\RecordList\Event\ ModifyRecordListRecordActionsEvent

An event to modify the displayed record actions (e.g.

"edit", "copy", "delete") for a table in the RecordList.

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.

param string $action

the action

param string $actionName

the actionName, default: ''

param string $group

the group, default: ''

param string $before

the before, default: ''

param string $after

the after, default: ''

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.

param string $actionName

the actionName

param string $group

the group, default: ''

returntype

bool

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.

param string $actionName

the actionName

param string $group

the group, default: ''

returntype

string

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.

param string $actionName

the actionName

param string $group

the group, default: ''

returntype

bool

Returns:

bool Whether the action could be removed - Will therefore

getActionGroup ( string $group)

Get the actions of a specific group

param string $group

the group

returntype

array

setActions ( array $actions)
param array $actions

the actions

getActions ( )
returntype

array

getTable ( )
returntype

string

getRecord ( )
returntype

array

getRecordList ( )

Returns the current DatabaseRecordList instance.

returntype

TYPO3\CMS\Backend\RecordList\DatabaseRecordList