class LightningApiServiceProvider in Lightning API 8.4
Same name and namespace in other branches
- 8 src/LightningApiServiceProvider.php \Drupal\lightning_api\LightningApiServiceProvider
- 8.2 src/LightningApiServiceProvider.php \Drupal\lightning_api\LightningApiServiceProvider
- 8.3 src/LightningApiServiceProvider.php \Drupal\lightning_api\LightningApiServiceProvider
Modifies container services at compile time.
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\lightning_api\LightningApiServiceProvider
Expanded class hierarchy of LightningApiServiceProvider
File
- src/
LightningApiServiceProvider.php, line 11
Namespace
Drupal\lightning_apiView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LightningApiServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceProviderBase:: |
|
ServiceProviderBase:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |
1 |