class FileServiceProvider
Same name in other branches
- 8.9.x core/modules/file/src/FileServiceProvider.php \Drupal\file\FileServiceProvider
- 10 core/modules/file/src/FileServiceProvider.php \Drupal\file\FileServiceProvider
- 11.x core/modules/file/src/FileServiceProvider.php \Drupal\file\FileServiceProvider
Adds 'application/octet-stream' as a known (bin) format.
Hierarchy
- class \Drupal\file\FileServiceProvider implements \Drupal\Core\DependencyInjection\ServiceModifierInterface
Expanded class hierarchy of FileServiceProvider
File
-
core/
modules/ file/ src/ FileServiceProvider.php, line 12
Namespace
Drupal\fileView source
class FileServiceProvider implements ServiceModifierInterface {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
if ($container->has('http_middleware.negotiation') && is_a($container->getDefinition('http_middleware.negotiation')
->getClass(), NegotiationMiddleware::class, TRUE)) {
$container->getDefinition('http_middleware.negotiation')
->addMethodCall('registerFormat', [
'bin',
[
'application/octet-stream',
],
]);
}
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
FileServiceProvider::alter | public | function | Modifies existing service definitions. | Overrides ServiceModifierInterface::alter |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.