You are here

public function LightningApiServiceProvider::alter in Lightning API 8

Same name and namespace in other branches
  1. 8.4 src/LightningApiServiceProvider.php \Drupal\lightning_api\LightningApiServiceProvider::alter()
  2. 8.2 src/LightningApiServiceProvider.php \Drupal\lightning_api\LightningApiServiceProvider::alter()
  3. 8.3 src/LightningApiServiceProvider.php \Drupal\lightning_api\LightningApiServiceProvider::alter()

Modifies existing service definitions.

Parameters

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

Overrides ServiceProviderBase::alter

File

src/LightningApiServiceProvider.php, line 13

Class

LightningApiServiceProvider

Namespace

Drupal\lightning_api

Code

public function alter(ContainerBuilder $container) {
  parent::alter($container);
  if ($container
    ->hasDefinition('metatag.normalizer.metatag_field')) {
    $container
      ->getDefinition('metatag.normalizer.metatag_field')
      ->clearTag('normalizer');
  }
  if ($container
    ->hasDefinition('metatag.normalizer.metatag')) {
    $container
      ->getDefinition('metatag.normalizer.metatag')
      ->clearTag('normalizer');
  }
  if ($container
    ->hasDefinition('metatag.normalizer.metatag.hal')) {
    $container
      ->getDefinition('metatag.normalizer.metatag.hal')
      ->clearTag('normalizer');
  }
}