W3cubDocs

/Drupal 8

class CoreServiceProvider

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

Related topics

Services and Dependency Injection Container
Overview of the Dependency Injection Container and Services.

File

core/lib/Drupal/Core/CoreServiceProvider.php, line 42

Namespace

Drupal\Core

Members

Name Modifiers Type Description
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.
CoreServiceProvider::registerUuid public static function Determines and registers the UUID service.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!CoreServiceProvider.php/class/CoreServiceProvider/8.1.x