function FileSanitizationEventSubscriber::onFileSanitization

Same name in other branches
  1. 10 core/modules/file/tests/modules/file_validator_test/src/EventSubscriber/FileSanitizationEventSubscriber.php \Drupal\file_validator_test\EventSubscriber\FileSanitizationEventSubscriber::onFileSanitization()

Handles the file sanitization event.

File

core/modules/file/tests/modules/file_validator_test/src/EventSubscriber/FileSanitizationEventSubscriber.php, line 25

Class

FileSanitizationEventSubscriber
Provides a file sanitization listener for file upload tests.

Namespace

Drupal\file_validator_test\EventSubscriber

Code

public function onFileSanitization(FileUploadSanitizeNameEvent $event) {
    $this->allowedExtensions = $event->getAllowedExtensions();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.