class TrailingSlashServiceProvider in Trailing Slash 8
Class TrailingSlashServiceProvider.
@package Drupal\trailing_slash
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\trailing_slash\TrailingSlashServiceProvider
Expanded class hierarchy of TrailingSlashServiceProvider
File
- src/
TrailingSlashServiceProvider.php, line 14
Namespace
Drupal\trailing_slashView source
class TrailingSlashServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) : void {
if ($container
->hasDefinition('url_generator.non_bubbling') && $container
->hasDefinition('path_processor_language')) {
$container
->getDefinition('url_generator.non_bubbling')
->setClass('Drupal\\trailing_slash\\Routing\\TrailingSlashUrlGenerator')
->addArgument(new Reference('path_processor_language'));
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ServiceProviderBase:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |
1 |
TrailingSlashServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceProviderBase:: |