protected static function ServiceContainer::getContainerBuilder in Service Container 7.2
Same name and namespace in other branches
- 7 lib/ServiceContainer.php \ServiceContainer::getContainerBuilder()
Return value
\Drupal\service_container\DependencyInjection\CachedContainerBuilder
1 call to ServiceContainer::getContainerBuilder()
- ServiceContainer::init in lib/
ServiceContainer.php - Initializes the container.
File
- lib/
ServiceContainer.php, line 83 - Contains ServiceContainer
Class
- ServiceContainer
- Static Service Container wrapper extension - initializes the container.
Code
protected static function getContainerBuilder() {
$service_provider_manager = new ServiceProviderPluginManager();
// This is an internal API, but we need the cache object.
$cache = _cache_get_object('cache');
$container_builder = new CachedContainerBuilder($service_provider_manager, $cache);
return $container_builder;
}