public function GroupServiceProvider::alter in Group 8
Same name and namespace in other branches
- 2.0.x src/GroupServiceProvider.php \Drupal\group\GroupServiceProvider::alter()
Modifies existing service definitions.
Parameters
ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.
Overrides ServiceProviderBase::alter
File
- src/
GroupServiceProvider.php, line 17
Class
- GroupServiceProvider
- Alters existing services for the Group module.
Namespace
Drupal\groupCode
public function alter(ContainerBuilder $container) {
// Ensures you can update to enable VariationCache without the container
// choking on the variation_cache_factory service no longer being there.
if (!$container
->hasDefinition('variation_cache_factory')) {
$definition = new Definition('\\Drupal\\group\\VariationCacheFactoryUpdateFix');
$container
->addDefinitions([
'variation_cache_factory' => $definition,
]);
}
}