public function SocialDemoServiceProvider::alter in Open Social 8.9
Same name and namespace in other branches
- 8.8 modules/custom/social_demo/src/SocialDemoServiceProvider.php \Drupal\social_demo\SocialDemoServiceProvider::alter()
- 10.3.x modules/custom/social_demo/src/SocialDemoServiceProvider.php \Drupal\social_demo\SocialDemoServiceProvider::alter()
- 10.0.x modules/custom/social_demo/src/SocialDemoServiceProvider.php \Drupal\social_demo\SocialDemoServiceProvider::alter()
- 10.1.x modules/custom/social_demo/src/SocialDemoServiceProvider.php \Drupal\social_demo\SocialDemoServiceProvider::alter()
- 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_demoCode
public function alter(ContainerBuilder $container) {
// Overrides language_manager class to test domain language negotiation.
$definition = $container
->getDefinition('messenger');
$definition
->setClass('Drupal\\social_demo\\Messenger');
}