AfterFileCommandProcessedEvent

New in version 11.4.

The AfterFileCommandProcessedEvent can be used to perform additional tasks for specific file commands. For example, trigger a custom indexer after a file has been uploaded.

The AfterFileCommandProcessedEvent is fired in the ExtendedFileUtility class.

Example

Registration of the event in the Services.yaml:

MyVendor\MyPackage\File\MyEventListener:
  tags:
    - name: event.listener
      identifier: 'my-package/file/my-event-listener'

The corresponding event listener class:

use TYPO3\CMS\Core\Resource\Event\AfterFileCommandProcessedEvent;

final class MyEventListener {

    public function __invoke(AfterFileCommandProcessedEvent $event): void
    {
        // do magic here
    }

}

API

class TYPO3\CMS\Core\Resource\Event\AfterFileCommandProcessedEvent

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'

]

Return type

array

getResult()
Return type

mixed

Returns

The result - Depending on the performed action, this could e.g. be a File or just a boolean.

getConflictMode()
Return type

string

Returns

The current conflict mode