ProcessFileListActionsEvent
The PSR-14 event
\TYPO3\
is fired after generating the actions for the files and folders listing in the
Media module.
This event can be used to manipulate the icons/actions, used for the edit control section in the files and folders listing within the Media module.
Example
<?php
declare(strict_types=1);
namespace MyVendor\MyExtension\FileList\EventListener;
use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Filelist\Event\ProcessFileListActionsEvent;
#[AsEventListener(
identifier: 'my-extension/process-file-list',
)]
final readonly class MyEventListener
{
public function __invoke(ProcessFileListActionsEvent $event): void
{
// do your magic
}
}
API
- class ProcessFileListActionsEvent
-
- Fully qualified name
-
\TYPO3\
CMS\ Filelist\ Event\ Process File List Actions Event
Event fired to modify icons rendered for the file listings
- setAction ( ?\TYPO3\CMS\Backend\Template\Components\ComponentInterface $action, string $actionName, \TYPO3\CMS\Backend\Template\Components\ActionGroup $group = \TYPO3\CMS\Backend\Template\Components\ActionGroup::secondary, 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 none or an invalid $group is provided, the new action will be added to the secondary group.
- param $action
-
the action
- param $actionName
-
the actionName
- param $group
-
the group, default: TYPO3CMSBackendTemplateComponentsActionGroup::secondary
- param $before
-
the before, default: ''
- param $after
-
the after, default: ''
- hasAction ( string $actionName, ?\TYPO3\CMS\Backend\Template\Components\ActionGroup $group = NULL)
-
Whether the action exists in the given group. In case none or an invalid $group is provided, both groups will be checked.
- param $actionName
-
the actionName
- param $group
-
the group, default: NULL
- Returns
-
bool
- getAction ( string $actionName, ?\TYPO3\CMS\Backend\Template\Components\ActionGroup $group = NULL)
-
Get action by its name. In case the action exists in both groups and none or an invalid $group is provided, the action from the "primary" group will be returned.
- param $actionName
-
the actionName
- param $group
-
the group, default: NULL
- Returns
-
?TYPO3CMSBackendTemplate Components Component Interface
- removeAction ( string $actionName, ?\TYPO3\CMS\Backend\Template\Components\ActionGroup $group = NULL)
-
Remove action by its name. In case the action exists in both groups and none or an invalid $group is provided, the action will be removed from both groups.
- param $actionName
-
the actionName
- param $group
-
the group, default: NULL
- moveActionTo ( string $actionName, \TYPO3\CMS\Backend\Template\Components\ActionGroup $group, string $before = '', string $after = '')
-
- param $actionName
-
the actionName
- param $group
-
the group
- param $before
-
the before, default: ''
- param $after
-
the after, default: ''