You are here

public function TokenServiceProvider::alter in Token 8

Modifies existing service definitions.

Parameters

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

Overrides ServiceProviderBase::alter

File

src/TokenServiceProvider.php, line 16

Class

TokenServiceProvider
Replace core's token service with our own.

Namespace

Drupal\token

Code

public function alter(ContainerBuilder $container) {
  $definition = $container
    ->getDefinition('token');
  $definition
    ->setClass('\\Drupal\\token\\Token');
}