ModifyRecordListRecordActionsEvent¶
New in version 11.4
An event to modify the displayed record actions (for example edit, copy, delete) for a table in the record list.
API¶
- class ModifyRecordListRecordActionsEvent ¶
-
- Fully qualified name
-
\TYPO3\
CMS\ Recordlist\ Event\ Modify Record List Record Actions Event
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
-
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
- 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\Recordlist\RecordList\DatabaseRecordList