You are here

public function DefaultcontentServiceProvider::alter in Default Content 8

Modifies existing service definitions.

Parameters

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

Overrides ServiceProviderBase::alter

File

src/DefaultcontentServiceProvider.php, line 12
Contains \Drupal\defaultcontent\defaultContentServiceProvider.

Class

DefaultcontentServiceProvider

Namespace

Drupal\defaultcontent

Code

public function alter(\Drupal\Core\DependencyInjection\ContainerBuilder $container) {

  // Override the language_manager class with a new class.
  $definition = $container
    ->getDefinition('rest.link_manager.type');
  $definition
    ->setClass('Drupal\\defaultcontent\\LinkManager\\TypeLinkManager');
}