class FileUploadSecureValidatorServiceProvider in File Upload Secure Validator 8
Dynamically register a fileinfo validator service.
Registers only if the fileinfo extension is available.
Hierarchy
- class \Drupal\file_upload_secure_validator\FileUploadSecureValidatorServiceProvider implements ServiceModifierInterface
Expanded class hierarchy of FileUploadSecureValidatorServiceProvider
File
- src/
FileUploadSecureValidatorServiceProvider.php, line 14
Namespace
Drupal\file_upload_secure_validatorView source
class FileUploadSecureValidatorServiceProvider implements ServiceModifierInterface {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
if (!SymfonyFileinfoMimeTypeGuesser::isSupported()) {
$container
->removeDefinition('file_upload_secure_validator');
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FileUploadSecureValidatorServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceModifierInterface:: |