public function UpdateServiceProvider::register in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Update/UpdateServiceProvider.php \Drupal\Core\Update\UpdateServiceProvider::register()
- 9 core/lib/Drupal/Core/Update/UpdateServiceProvider.php \Drupal\Core\Update\UpdateServiceProvider::register()
File
- core/
lib/ Drupal/ Core/ Update/ UpdateServiceProvider.php, line 19
Class
- UpdateServiceProvider
- Customizes the container for running updates.
Namespace
Drupal\Core\UpdateCode
public function register(ContainerBuilder $container) {
// Decorate the cache factory in order to use
// \Drupal\Core\Update\UpdateBackend while running updates.
$container
->register('update.cache_factory', UpdateCacheBackendFactory::class)
->setDecoratedService('cache_factory')
->addArgument(new Reference('update.cache_factory.inner'));
$container
->addCompilerPass(new UpdateCompilerPass(), PassConfig::TYPE_REMOVE, 128);
}