You are here

class GroupServiceProvider in Group 8

Same name and namespace in other branches
  1. 2.0.x src/GroupServiceProvider.php \Drupal\group\GroupServiceProvider

Alters existing services for the Group module.

Hierarchy

Expanded class hierarchy of GroupServiceProvider

File

src/GroupServiceProvider.php, line 12

Namespace

Drupal\group
View 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

Namesort descending Modifiers Type Description Overrides
GroupServiceProvider::alter public function Modifies existing service definitions. Overrides ServiceProviderBase::alter
ServiceProviderBase::register public function Registers services to the container. Overrides ServiceProviderInterface::register 1