You are here

class LightningApiServiceProvider in Lightning API 8

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

Hierarchy

Expanded class hierarchy of LightningApiServiceProvider

File

src/LightningApiServiceProvider.php, line 8

Namespace

Drupal\lightning_api
View source
class LightningApiServiceProvider extends ServiceProviderBase {

  /**
   * {@inheritdoc}
   */
  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');
    }
  }

}

Members

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