ModifyRecordListRecordActionsEvent

final 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.

Table of Contents

Methods

__construct()  : mixed
getAction()  : string|null
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.
getActionGroup()  : array|null
Get the actions of a specific group
getActions()  : array
getRecord()  : array
getRecordList()  : DatabaseRecordList
Returns the current DatabaseRecordList instance.
getTable()  : string
hasAction()  : bool
Whether the action exists in the given group. In case non or an invalid $group is provided, both groups will be checked.
removeAction()  : bool
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.
setAction()  : void
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.
setActions()  : void

Methods

getAction()

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.

public getAction(string $actionName[, string $group = '' ]) : string|null

Parameters

$actionName : string
$group : string = ''

Return values

string|null

getActionGroup()

Get the actions of a specific group

public getActionGroup(string $group) : array|null

Parameters

$group : string

Return values

array|null

getActions()

public getActions() : array

Return values

array

getRecord()

public getRecord() : array

Return values

array

getTable()

public getTable() : string

Return values

string

hasAction()

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

public hasAction(string $actionName[, string $group = '' ]) : bool

Parameters

$actionName : string
$group : string = ''

Return values

bool

removeAction()

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.

public removeAction(string $actionName[, string $group = '' ]) : bool

Parameters

$actionName : string
$group : string = ''

Return values

bool —

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

setAction()

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.

public setAction(string $action[, string $actionName = '' ][, string $group = '' ][, string $before = '' ][, string $after = '' ]) : void

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

Parameters

$action : string
$actionName : string = ''
$group : string = ''
$before : string = ''
$after : string = ''

setActions()

public setActions(array $actions) : void

Parameters

$actions : array
On this page