You are here

public function PurlServiceProvider::alter in Persistent URL 8

Modifies existing service definitions.

Parameters

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

Overrides ServiceProviderBase::alter

File

src/PurlServiceProvider.php, line 18

Class

PurlServiceProvider

Namespace

Drupal\purl

Code

public function alter(ContainerBuilder $container) {
  $urlGeneratorDefinition = $container
    ->getDefinition('url_generator');
  $urlGeneratorDefinition
    ->replaceArgument(0, new Reference('purl.url_generator'));
}