You are here

public static function SecurityFileUploadEventSubscriber::getSubscribedEvents in Drupal 9

Same name and namespace in other branches
  1. 10 core/modules/system/src/EventSubscriber/SecurityFileUploadEventSubscriber.php \Drupal\system\EventSubscriber\SecurityFileUploadEventSubscriber::getSubscribedEvents()

File

core/modules/system/src/EventSubscriber/SecurityFileUploadEventSubscriber.php, line 37

Class

SecurityFileUploadEventSubscriber
The final subscriber to 'file.upload.sanitize.name'.

Namespace

Drupal\system\EventSubscriber

Code

public static function getSubscribedEvents() {

  // This event must be run last to ensure the filename obeys the security
  // rules.
  $events[FileUploadSanitizeNameEvent::class][] = [
    'sanitizeName',
    PHP_INT_MIN,
  ];
  return $events;
}