You are here

public function SiteMapServiceProvider::alter in Site map 8

Modifies existing service definitions.

Parameters

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

Overrides ServiceModifierInterface::alter

File

src/SiteMapServiceProvider.php, line 16

Class

SiteMapServiceProvider
ServiceProvider class for site_map module.

Namespace

Drupal\site_map

Code

public function alter(ContainerBuilder $container) {

  // Change class of menu.link_tree service.
  $definition = $container
    ->getDefinition('menu.link_tree');
  $definition
    ->setClass('Drupal\\site_map\\Menu\\MenuLinkTree');
}