You are here

public function SocialLanguageServiceProvider::alter in Open Social 8

Same name and namespace in other branches
  1. 8.9 modules/custom/social_language/src/SocialLanguageServiceProvider.php \Drupal\social_language\SocialLanguageServiceProvider::alter()
  2. 8.2 modules/custom/social_language/src/SocialLanguageServiceProvider.php \Drupal\social_language\SocialLanguageServiceProvider::alter()
  3. 8.3 modules/custom/social_language/src/SocialLanguageServiceProvider.php \Drupal\social_language\SocialLanguageServiceProvider::alter()
  4. 8.4 modules/custom/social_language/src/SocialLanguageServiceProvider.php \Drupal\social_language\SocialLanguageServiceProvider::alter()
  5. 8.5 modules/custom/social_language/src/SocialLanguageServiceProvider.php \Drupal\social_language\SocialLanguageServiceProvider::alter()
  6. 8.6 modules/custom/social_language/src/SocialLanguageServiceProvider.php \Drupal\social_language\SocialLanguageServiceProvider::alter()
  7. 8.7 modules/custom/social_language/src/SocialLanguageServiceProvider.php \Drupal\social_language\SocialLanguageServiceProvider::alter()
  8. 8.8 modules/custom/social_language/src/SocialLanguageServiceProvider.php \Drupal\social_language\SocialLanguageServiceProvider::alter()
  9. 10.3.x modules/custom/social_language/src/SocialLanguageServiceProvider.php \Drupal\social_language\SocialLanguageServiceProvider::alter()
  10. 10.0.x modules/custom/social_language/src/SocialLanguageServiceProvider.php \Drupal\social_language\SocialLanguageServiceProvider::alter()
  11. 10.1.x modules/custom/social_language/src/SocialLanguageServiceProvider.php \Drupal\social_language\SocialLanguageServiceProvider::alter()
  12. 10.2.x modules/custom/social_language/src/SocialLanguageServiceProvider.php \Drupal\social_language\SocialLanguageServiceProvider::alter()

Modifies existing service definitions.

Parameters

ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.

Overrides ServiceProviderBase::alter

File

modules/custom/social_language/src/SocialLanguageServiceProvider.php, line 19

Class

SocialLanguageServiceProvider
Class SocialLanguageServiceProvider.

Namespace

Drupal\social_language

Code

public function alter(ContainerBuilder $container) {
  $definition = $container
    ->getDefinition('main_content_renderer.modal');
  $definition
    ->setClass('Drupal\\social_language\\SocialLanguageModalRenderer');
  $definition = $container
    ->getDefinition('url_generator');
  $definition
    ->setClass('Drupal\\social_language\\SocialLanguageMetadataBubblingUrlGenerator')
    ->addArgument(new Reference('language_manager'));
}