You are here

class TrailingSlashServiceProvider in Trailing Slash 8

Class TrailingSlashServiceProvider.

@package Drupal\trailing_slash

Hierarchy

Expanded class hierarchy of TrailingSlashServiceProvider

File

src/TrailingSlashServiceProvider.php, line 14

Namespace

Drupal\trailing_slash
View 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

Namesort descending Modifiers Type Description Overrides
ServiceProviderBase::register public function Registers services to the container. Overrides ServiceProviderInterface::register 1
TrailingSlashServiceProvider::alter public function Modifies existing service definitions. Overrides ServiceProviderBase::alter