class UpdateServiceProvider in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Update/UpdateServiceProvider.php \Drupal\Core\Update\UpdateServiceProvider
Ensures for some services that they don't cache.
Hierarchy
- class \Drupal\Core\Update\UpdateServiceProvider implements ServiceModifierInterface, ServiceProviderInterface
Expanded class hierarchy of UpdateServiceProvider
File
- core/
lib/ Drupal/ Core/ Update/ UpdateServiceProvider.php, line 19 - Contains \Drupal\Core\Update\UpdateServiceProvider.
Namespace
Drupal\Core\UpdateView source
class UpdateServiceProvider implements ServiceProviderInterface, ServiceModifierInterface {
/**
* {@inheritdoc}
*/
public function register(ContainerBuilder $container) {
$definition = new Definition('Drupal\\Core\\Cache\\NullBackend', [
'null',
]);
$container
->setDefinition('cache.null', $definition);
}
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
$definition = $container
->getDefinition('asset.resolver');
$argument = new Reference('cache.null');
$definition
->replaceArgument(5, $argument);
$definition = $container
->getDefinition('library.discovery.collector');
$argument = new Reference('cache.null');
$definition
->replaceArgument(0, $argument);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UpdateServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceModifierInterface:: |
|
UpdateServiceProvider:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |