‪TYPO3CMS  11.5
TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent Class Reference

Public Member Functions

 __construct (array $actions, string $table, array $record, DatabaseRecordList $recordList)
 
 setAction (string $action, string $actionName='', string $group='', string $before='', string $after='')
 
bool hasAction (string $actionName, string $group='')
 
string null getAction (string $actionName, string $group='')
 
bool removeAction (string $actionName, string $group='')
 
array null getActionGroup (string $group)
 
 setActions (array $actions)
 
 getActions ()
 
 getTable ()
 
 getRecord ()
 
DatabaseRecordList getRecordList ()
 

Private Attributes

array $actions
 
string $table
 
array $record
 
DatabaseRecordList $recordList
 

Detailed Description

An event to modify the displayed record actions (e.g. "edit", "copy", "delete") for a table in the RecordList.

Definition at line 26 of file ModifyRecordListRecordActionsEvent.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ getAction()

string null TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent::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.

Parameters
string$actionName
string$group
Returns
‪string|null

Definition at line 108 of file ModifyRecordListRecordActionsEvent.php.

◆ getActionGroup()

array null TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent::getActionGroup ( string  $group)

Get the actions of a specific group

Parameters
string$group
Returns
‪array|null

Definition at line 155 of file ModifyRecordListRecordActionsEvent.php.

◆ getActions()

TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent::getActions ( )

◆ getRecord()

TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent::getRecord ( )

◆ getRecordList()

DatabaseRecordList TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent::getRecordList ( )

Returns the current DatabaseRecordList instance.

Returns
‪DatabaseRecordList
Todo:
‪Might be replaced by a DTO in the future

Definition at line 186 of file ModifyRecordListRecordActionsEvent.php.

References TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent\$recordList.

◆ getTable()

TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent::getTable ( )

◆ hasAction()

bool TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent::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.

Parameters
string$actionName
string$group
Returns
‪bool

Definition at line 90 of file ModifyRecordListRecordActionsEvent.php.

Referenced by TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent\setAction().

◆ removeAction()

bool TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent::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.

Parameters
string$actionName
string$group
Returns
‪bool Whether the action could be removed - Will therefore return FALSE if the action to remove does not exist.

Definition at line 127 of file ModifyRecordListRecordActionsEvent.php.

◆ setAction()

TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent::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.

Parameters
string$action
string$actionName
string$group
string$before
string$after

Definition at line 57 of file ModifyRecordListRecordActionsEvent.php.

References TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent\hasAction().

◆ setActions()

TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent::setActions ( array  $actions)

Member Data Documentation

◆ $actions

◆ $record

array TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent::$record
private

◆ $recordList

◆ $table

string TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent::$table
private