function FileUploadSanitizeNameEvent::stopPropagation

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/File/Event/FileUploadSanitizeNameEvent.php \Drupal\Core\File\Event\FileUploadSanitizeNameEvent::stopPropagation()
  2. 10 core/lib/Drupal/Core/File/Event/FileUploadSanitizeNameEvent.php \Drupal\Core\File\Event\FileUploadSanitizeNameEvent::stopPropagation()

Throws

\RuntimeException Thrown whenever this method is called. This event should always be fully processed so that SecurityFileUploadEventSubscriber::sanitizeName() gets a chance to run.

See also

\Drupal\system\EventSubscriber\SecurityFileUploadEventSubscriber

File

core/lib/Drupal/Core/File/Event/FileUploadSanitizeNameEvent.php, line 121

Class

FileUploadSanitizeNameEvent
An event during file upload that lets subscribers sanitize the filename.

Namespace

Drupal\Core\File\Event

Code

public function stopPropagation() : void {
    throw new \RuntimeException('Propagation cannot be stopped for the FileUploadSanitizeNameEvent');
}

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