class CoreServiceProvider implements ServiceProviderInterface, ServiceModifierInterface (View source)

ServiceProvider class for mandatory core services.

This is where Drupal core registers all of its compiler passes. The service definitions themselves are in core/core.services.yml with a few, documented exceptions (typically, install requirements).

Modules wishing to register services to the container should use modulename.services.yml in their respective directories.

Methods

register(ContainerBuilder $container)

Registers services to the container.

alter(ContainerBuilder $container)

Alters the UUID service to use the most efficient method available.

registerTest(ContainerBuilder $container)

Registers services and event subscribers for a site under test.

Details

register(ContainerBuilder $container)

Registers services to the container.

Parameters

ContainerBuilder $container

The ContainerBuilder to register services to.

alter(ContainerBuilder $container)

Alters the UUID service to use the most efficient method available.

Parameters

ContainerBuilder $container

The ContainerBuilder whose service definitions can be altered.

protected registerTest(ContainerBuilder $container)

Registers services and event subscribers for a site under test.

Parameters

ContainerBuilder $container

The container builder.