final class CoreContextServiceProvider in Core Context 8
Registers container services on behalf of Core Context.
Hierarchy
- class \Drupal\core_context\CoreContextServiceProvider implements ServiceProviderInterface
Expanded class hierarchy of CoreContextServiceProvider
File
- src/
CoreContextServiceProvider.php, line 12
Namespace
Drupal\core_contextView source
final class CoreContextServiceProvider implements ServiceProviderInterface {
/**
* {@inheritdoc}
*/
public function register(ContainerBuilder $container) {
$modules = $container
->getParameter('container.modules');
if (isset($modules['layout_builder'])) {
$container
->register('core_context.render_section_component_subscriber')
->setClass(EventSubscriber\SectionComponentRenderArray::class)
->setArguments([
new Reference('plugin.manager.layout_builder.section_storage'),
new Reference('entity_type.manager'),
])
->addTag('event_subscriber');
$container
->register('core_context.layout_builder')
->setClass(ContextProvider\LayoutBuilder::class)
->setArguments([
new Reference('entity_display.repository'),
new Reference('core_context.canonical_entity'),
new Reference('current_route_match'),
new Reference('entity_type.manager'),
])
->addTag('core_context.context_provider');
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CoreContextServiceProvider:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |