ModifyRecordListRecordActionsEvent 

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 ModifyRecordListRecordActionsEvent
Fully qualified name
\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 ( ?\TYPO3\CMS\Backend\Template\Components\ComponentInterface $action, string $actionName, \TYPO3\CMS\Backend\Template\Components\ActionGroup $group = \TYPO3\CMS\Backend\Template\Components\ActionGroup::secondary, 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 $action

the action

param $actionName

the actionName

param $group

the group, default: TYPO3CMSBackendTemplateComponentsActionGroup::secondary

param $before

the before, default: ''

param $after

the after, default: ''

hasAction ( string $actionName, ?\TYPO3\CMS\Backend\Template\Components\ActionGroup $group = NULL)

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

param $actionName

the actionName

param $group

the group, default: NULL

Returns
bool
getAction ( string $actionName, ?\TYPO3\CMS\Backend\Template\Components\ActionGroup $group = 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.

param $actionName

the actionName

param $group

the group, default: NULL

Returns
?\TYPO3\CMS\Backend\Template\Components\ComponentInterface
removeAction ( string $actionName, ?\TYPO3\CMS\Backend\Template\Components\ActionGroup $group = NULL)

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 $actionName

the actionName

param $group

the group, default: NULL

moveActionTo ( string $actionName, \TYPO3\CMS\Backend\Template\Components\ActionGroup $group, string $before = '', string $after = '')
param $actionName

the actionName

param $group

the group

param $before

the before, default: ''

param $after

the after, default: ''

getActionGroup ( \TYPO3\CMS\Backend\Template\Components\ActionGroup $group)

Get the actions of a specific group

param $group

the group

Returns
\TYPO3\CMS\Backend\Template\Components\ComponentGroup
getRecord ( )
Returns
\TYPO3\CMS\Core\Domain\RecordInterface
getRecordList ( )

Returns the current DatabaseRecordList instance.

Returns
\TYPO3\CMS\Backend\RecordList\DatabaseRecordList
getRequest ( )
Returns
\Psr\Http\Message\RequestInterface