function SecurityFileUploadEventSubscriber::getSubscribedEvents

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

File

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

Class

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

Namespace

Drupal\system\EventSubscriber

Code

public static function getSubscribedEvents() : array {
    // This event must be run last to ensure the filename obeys the security
    // rules.
    $events[FileUploadSanitizeNameEvent::class][] = [
        'sanitizeName',
        PHP_INT_MIN,
    ];
    return $events;
}

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