You are here

public function ConfigImportLocaleServiceProvider::alter in Locale: Config import 8

Modifies existing service definitions.

Parameters

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

Overrides ServiceProviderBase::alter

File

src/ConfigImportLocaleServiceProvider.php, line 16

Class

ConfigImportLocaleServiceProvider
Modifies the locale.config_subscriber service.

Namespace

Drupal\config_import_locale

Code

public function alter(ContainerBuilder $container) {

  // Changes the class for the locale.config_subscriber to our own class.
  $definition = $container
    ->getDefinition('locale.config_subscriber');
  $definition
    ->setClass('Drupal\\config_import_locale\\ConfigImportLocaleSubscriber');
}