function UpdateServiceProvider::alter
Same name in other branches
- 9 core/lib/Drupal/Core/Update/UpdateServiceProvider.php \Drupal\Core\Update\UpdateServiceProvider::alter()
- 8.9.x core/lib/Drupal/Core/Update/UpdateServiceProvider.php \Drupal\Core\Update\UpdateServiceProvider::alter()
- 11.x core/lib/Drupal/Core/Update/UpdateServiceProvider.php \Drupal\Core\Update\UpdateServiceProvider::alter()
Overrides ServiceModifierInterface::alter
File
-
core/
lib/ Drupal/ Core/ Update/ UpdateServiceProvider.php, line 33
Class
- UpdateServiceProvider
- Customizes the container for running updates.
Namespace
Drupal\Core\UpdateCode
public function alter(ContainerBuilder $container) {
// The alias-based processor requires the path_alias entity schema to be
// installed, so we prevent it from being registered to the path processor
// manager. We do this by removing the tags that the compiler pass looks
// for. This means that the URL generator can safely be used during the
// database update process.
if ($container->hasDefinition('path_alias.path_processor')) {
$container->getDefinition('path_alias.path_processor')
->clearTag('path_processor_inbound')
->clearTag('path_processor_outbound');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.