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() : ComponentInterface|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() : ComponentGroup
- Get the actions of a specific group
- getRecord() : RecordInterface
- getRecordList() : DatabaseRecordList
- Returns the current DatabaseRecordList instance.
- getRequest() : RequestInterface
- hasAction() : bool
- Whether the action exists in the given group. In case non or an invalid $group is provided, both groups will be checked.
- moveActionTo() : void
- removeAction() : void
- 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.
Methods
__construct()
    public
                    __construct(ComponentGroup $primary, ComponentGroup $secondary, RecordInterface $record, DatabaseRecordList $recordList, RequestInterface $request) : mixed
    Parameters
- $primary : ComponentGroup
- $secondary : ComponentGroup
- $record : RecordInterface
- $recordList : DatabaseRecordList
- $request : RequestInterface
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[, ActionGroup|null $group = null ]) : ComponentInterface|null
    Parameters
- $actionName : string
- $group : ActionGroup|null = null
Return values
ComponentInterface|nullgetActionGroup()
Get the actions of a specific group
    public
                    getActionGroup(ActionGroup $group) : ComponentGroup
    Parameters
- $group : ActionGroup
Return values
ComponentGroupgetRecord()
    public
                    getRecord() : RecordInterface
    Return values
RecordInterfacegetRecordList()
Returns the current DatabaseRecordList instance.
    public
                    getRecordList() : DatabaseRecordList
    Tags
Return values
DatabaseRecordListgetRequest()
    public
                    getRequest() : RequestInterface
    Return values
RequestInterfacehasAction()
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[, ActionGroup|null $group = null ]) : bool
    Parameters
- $actionName : string
- $group : ActionGroup|null = null
Return values
boolmoveActionTo()
    public
                    moveActionTo(string $actionName, ActionGroup $group[, string $before = '' ][, string $after = '' ]) : void
    Parameters
- $actionName : string
- $group : ActionGroup
- $before : string = ''
- $after : string = ''
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[, ActionGroup|null $group = null ]) : void
    Parameters
- $actionName : string
- $group : ActionGroup|null = null
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(ComponentInterface|null $action, string $actionName[, ActionGroup $group = ActionGroup::secondary ][, 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 : ComponentInterface|null
- $actionName : string
- $group : ActionGroup = ActionGroup::secondary
- $before : string = ''
- $after : string = ''