class GroupServiceProvider in Group 8
Same name and namespace in other branches
- 2.0.x src/GroupServiceProvider.php \Drupal\group\GroupServiceProvider
Alters existing services for the Group module.
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\group\GroupServiceProvider
Expanded class hierarchy of GroupServiceProvider
File
- src/
GroupServiceProvider.php, line 12
Namespace
Drupal\groupView source
class GroupServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
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,
]);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GroupServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceProviderBase:: |
|
ServiceProviderBase:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |
1 |