class DepcalcServiceProvider in Dependency Calculation 8
Optionally adds to the container when content_moderation is enabled.
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\depcalc\DepcalcServiceProvider
Expanded class hierarchy of DepcalcServiceProvider
File
- src/
DepcalcServiceProvider.php, line 12
Namespace
Drupal\depcalcView source
class DepcalcServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
parent::alter($container);
if ($container
->hasDefinition('content_moderation.moderation_information')) {
$container
->getDefinition('workflow.dependency_calculator')
->addArgument(new Reference('content_moderation.moderation_information'));
}
if ($container
->hasDefinition('plugin.manager.core.layout')) {
$container
->getDefinition('layout_builder.dependency_calculator')
->addArgument(new Reference('plugin.manager.core.layout'));
$container
->getDefinition('layout_builder.entity_view_display.dependency_calculator')
->addArgument(new Reference('plugin.manager.core.layout'));
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DepcalcServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceProviderBase:: |
|
ServiceProviderBase:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |
1 |