public function DomainSourceServiceProvider::alter in Domain Access 8
Modifies existing service definitions.
Parameters
ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.
Overrides ServiceProviderBase::alter
File
- domain_source/
src/ DomainSourceServiceProvider.php, line 16
Class
- DomainSourceServiceProvider
- Provides services for the domain module that extend core functionality.
Namespace
Drupal\domain_sourceCode
public function alter(ContainerBuilder $container) {
$definition = $container
->getDefinition('redirect_response_subscriber');
if ($this
->getDrupalVersion() > 8) {
$definition
->setClass('Drupal\\domain_source\\EventSubscriber\\DomainSourceRedirectResponseSubscriber');
}
else {
$definition
->setClass('Drupal\\domain_source\\EventSubscriber\\DomainSourceRedirectResponseSubscriberD8');
}
}