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

Public Member Functions

 __construct (array $actions, string $table, array $recordIds, DatabaseRecordList $recordList)
 
 setAction (string $action, string $actionName='', string $before='', string $after='')
 
bool hasAction (string $actionName)
 
string null getAction (string $actionName)
 
bool removeAction (string $actionName)
 
 setActions (array $actions)
 
 getActions ()
 
 setNoActionLabel (string $noActionLabel)
 
string getNoActionLabel ()
 
 getTable ()
 
 getRecordIds ()
 
DatabaseRecordList getRecordList ()
 

Private Attributes

array $actions
 
string $table
 
array $recordIds
 
DatabaseRecordList $recordList
 
string $noActionLabel = ''
 

Detailed Description

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

Definition at line 26 of file ModifyRecordListTableActionsEvent.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ getAction()

string null TYPO3\CMS\Recordlist\Event\ModifyRecordListTableActionsEvent::getAction ( string  $actionName)

Get action by its name

Parameters
string$actionName
Returns
‪string|null The action or NULL if the action does not exist

Definition at line 100 of file ModifyRecordListTableActionsEvent.php.

◆ getActions()

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

◆ getNoActionLabel()

string TYPO3\CMS\Recordlist\Event\ModifyRecordListTableActionsEvent::getNoActionLabel ( )

Get the label, which will be displayed, in case no action is available for the current user. Note: If this returns an empty string, this only means that no other listener set a label before. TYPO3 will always fall back to a default if this remains empty.

Returns
‪string

Definition at line 145 of file ModifyRecordListTableActionsEvent.php.

References TYPO3\CMS\Recordlist\Event\ModifyRecordListTableActionsEvent\$noActionLabel.

◆ getRecordIds()

TYPO3\CMS\Recordlist\Event\ModifyRecordListTableActionsEvent::getRecordIds ( )

◆ getRecordList()

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

Returns the current DatabaseRecordList instance.

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

Definition at line 166 of file ModifyRecordListTableActionsEvent.php.

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

◆ getTable()

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

◆ hasAction()

bool TYPO3\CMS\Recordlist\Event\ModifyRecordListTableActionsEvent::hasAction ( string  $actionName)

Whether the action exists

Parameters
string$actionName
Returns
‪bool

Definition at line 89 of file ModifyRecordListTableActionsEvent.php.

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

◆ removeAction()

bool TYPO3\CMS\Recordlist\Event\ModifyRecordListTableActionsEvent::removeAction ( string  $actionName)

Remove action by its name

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

Definition at line 112 of file ModifyRecordListTableActionsEvent.php.

◆ setAction()

TYPO3\CMS\Recordlist\Event\ModifyRecordListTableActionsEvent::setAction ( string  $action,
string  $actionName = '',
string  $before = '',
string  $after = '' 
)

Add a new action or override an existing one. Latter is only possible, in case $actionName is given. Otherwise, the action 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.

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

Definition at line 66 of file ModifyRecordListTableActionsEvent.php.

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

◆ setActions()

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

◆ setNoActionLabel()

TYPO3\CMS\Recordlist\Event\ModifyRecordListTableActionsEvent::setNoActionLabel ( string  $noActionLabel)

Member Data Documentation

◆ $actions

◆ $noActionLabel

string TYPO3\CMS\Recordlist\Event\ModifyRecordListTableActionsEvent::$noActionLabel = ''
private

◆ $recordIds

array TYPO3\CMS\Recordlist\Event\ModifyRecordListTableActionsEvent::$recordIds
private

◆ $recordList

◆ $table

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