function FileValidationTestSubscriber::onFileValidation

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

Handles the file validation event.

Parameters

\Drupal\file\Validation\FileValidationEvent $event: The event.

File

core/modules/file/tests/modules/file_validator_test/src/EventSubscriber/FileValidationTestSubscriber.php, line 21

Class

FileValidationTestSubscriber
Provides a validation listener for file validation tests.

Namespace

Drupal\file_validator_test\EventSubscriber

Code

public function onFileValidation(FileValidationEvent $event) : void {
    _file_test_log_call('validate', [
        $event->file
            ->id(),
    ]);
}

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