You are here

public function SocialDemoServiceProvider::alter in Open Social 8.9

Same name and namespace in other branches
  1. 8.8 modules/custom/social_demo/src/SocialDemoServiceProvider.php \Drupal\social_demo\SocialDemoServiceProvider::alter()
  2. 10.3.x modules/custom/social_demo/src/SocialDemoServiceProvider.php \Drupal\social_demo\SocialDemoServiceProvider::alter()
  3. 10.0.x modules/custom/social_demo/src/SocialDemoServiceProvider.php \Drupal\social_demo\SocialDemoServiceProvider::alter()
  4. 10.1.x modules/custom/social_demo/src/SocialDemoServiceProvider.php \Drupal\social_demo\SocialDemoServiceProvider::alter()
  5. 10.2.x modules/custom/social_demo/src/SocialDemoServiceProvider.php \Drupal\social_demo\SocialDemoServiceProvider::alter()

Modifies existing service definitions.

Parameters

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

Overrides ServiceProviderBase::alter

File

modules/custom/social_demo/src/SocialDemoServiceProvider.php, line 18

Class

SocialDemoServiceProvider
Class SocialCoreServiceProvider.

Namespace

Drupal\social_demo

Code

public function alter(ContainerBuilder $container) {

  // Overrides language_manager class to test domain language negotiation.
  $definition = $container
    ->getDefinition('messenger');
  $definition
    ->setClass('Drupal\\social_demo\\Messenger');
}