class SophronGuesserServiceProvider in Sophron 8
Modifies the "file.mime_type.guesser.extension" service.
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\sophron_guesser\SophronGuesserServiceProvider
Expanded class hierarchy of SophronGuesserServiceProvider
File
- sophron_guesser/
src/ SophronGuesserServiceProvider.php, line 12
Namespace
Drupal\sophron_guesserView source
class SophronGuesserServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
// Overrides "file.mime_type.guesser.extension" to use Sophron.
$definition = $container
->getDefinition('file.mime_type.guesser.extension');
$definition
->setClass(SophronMimeTypeGuesser::class)
->setArguments([
new Reference('sophron.mime_map.manager'),
new Reference('file_system'),
]);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ServiceProviderBase:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |
1 |
SophronGuesserServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceProviderBase:: |