class TokenServiceProvider in Token 8
Replace core's token service with our own.
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\token\TokenServiceProvider
Expanded class hierarchy of TokenServiceProvider
File
- src/
TokenServiceProvider.php, line 11
Namespace
Drupal\tokenView source
class TokenServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
$definition = $container
->getDefinition('token');
$definition
->setClass('\\Drupal\\token\\Token');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ServiceProviderBase:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |
1 |
TokenServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceProviderBase:: |