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.
Hierarchy
- class \Drupal\Core\CoreServiceProvider implements ServiceModifierInterface, ServiceProviderInterface
Related topics
- Services and Dependency Injection Container
- Overview of the Dependency Injection Container and Services.
File
- core/lib/Drupal/Core/CoreServiceProvider.php, line 45
Namespace
Drupal\Core
Members
Name | Modifiers | Type | Description |
---|---|---|---|
CoreServiceProvider::alter | public | function | Alters the UUID service to use the most efficient method available. Overrides ServiceModifierInterface::alter |
CoreServiceProvider::register | public | function | Registers services to the container. Overrides ServiceProviderInterface::register |
CoreServiceProvider::registerTest | protected | function | Registers services and event subscribers for a site under test. |
Please login to continue.