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\
to
\TYPO3\
.
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\
allows to modify the displayed record actions (for example
edit, copy, delete) for a table in
the record list.
Usage
API
- class ModifyRecordListRecordActionsEvent
-
- Fully qualified name
-
\TYPO3\
CMS\ Backend\ Record List\ 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 $action
-
the action
- param $actionName
-
the actionName, default: ''
- param $group
-
the group, default: ''
- param $before
-
the before, default: ''
- param $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 $actionName
-
the actionName
- param $group
-
the group, default: ''
- Returns
-
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 $actionName
-
the actionName
- param $group
-
the group, default: ''
- Returns
-
?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 $actionName
-
the actionName
- param $group
-
the group, default: ''
- Return description
-
Whether the action could be removed - Will thereforereturn FALSE if the action to remove does not exist.
- Returns
-
bool