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.

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.

Parameters
  • $action (string) -- the action

  • $actionName (string) -- the actionName, default: ''

  • $group (string) -- the group, default: ''

  • $before (string) -- the before, default: ''

  • $after (string) -- 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.

Parameters
  • $actionName (string) -- the actionName

  • $group (string) -- the group, default: ''

Return type

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.

Parameters
  • $actionName (string) -- the actionName

  • $group (string) -- the group, default: ''

Return type

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.

Parameters
  • $actionName (string) -- the actionName

  • $group (string) -- the group, default: ''

Return type

bool

Returns

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

getActionGroup(string $group)

Get the actions of a specific group

Parameters
  • $group (string) -- the group

Return type

array

setActions(array $actions)
Parameters
  • $actions (array) -- the actions

getActions()
Return type

array

getTable()
Return type

string

getRecord()
Return type

array

getRecordList()

Returns the current DatabaseRecordList instance.

Return type

TYPO3\CMS\Backend\RecordList\DatabaseRecordList