AfterFileCommandProcessedEvent
New in version 11.4
The PSR-14 event
\TYPO3\
can be used
to perform additional tasks for specific file commands. For example, trigger a
custom indexer after a file has been uploaded.
This event is fired in the
\TYPO3\
class.
Example
<?php
declare(strict_types=1);
namespace MyVendor\MyExtension\Resource\EventListener;
use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Core\Resource\Event\AfterFileCommandProcessedEvent;
#[AsEventListener(
identifier: 'my-extension/after-file-command-processed',
)]
final readonly class MyEventListener
{
public function __invoke(AfterFileCommandProcessedEvent $event): void
{
// Do magic here
}
}
New in version 13.0
The PHP attribute \TYPO3\
has been
introduced to tag a PHP class as an event listener. Alternatively, or if you
need to be compatible with older TYPO3 versions, you can also register an
event listener via the Configuration/
file. Switch to
an older version of this page for an example or have a look at the section
Implementing an event listener in your extension.
API
- class AfterFileCommandProcessedEvent
-
- Fully qualified name
-
\TYPO3\
CMS\ Core\ Resource\ Event\ After File Command Processed Event
Event that is triggered after a file command has been processed. Can be used to perform additional tasks for specific commands. For example, trigger a custom indexer after a file has been uploaded.
- getCommand ( )
-
A single command, e.g.
'upload' => [ 'target' => '1:/some/folder/' 'data' => '1' ]
Copied!- Returns
-
array<string,array<string,mixed>>