You are here

public function LanguageNeutralAliasesServiceProvider::alter in Language neutral aliases 8

Modifies existing service definitions.

Parameters

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

Overrides ServiceProviderBase::alter

File

src/LanguageNeutralAliasesServiceProvider.php, line 16

Class

LanguageNeutralAliasesServiceProvider
Modifies the path alias storage service.

Namespace

Drupal\language_neutral_aliases

Code

public function alter(ContainerBuilder $container) {

  // Overrides path.alias_storage class to store aliases language neutral.
  $definition = $container
    ->getDefinition('path.alias_storage');
  $definition
    ->setClass('Drupal\\language_neutral_aliases\\LanguageNeutralAliasesStorage');
}