Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Kernel.php

function Kernel::getContainerBuilder

Gets a new ContainerBuilder instance used to build the service container.

1 call to Kernel::getContainerBuilder()
Kernel::buildContainer in vendor/symfony/http-kernel/Kernel.php
Builds the service container.

File

vendor/symfony/http-kernel/Kernel.php, line 648

Class

Kernel
The Kernel is the heart of the Symfony system.

Namespace

Symfony\Component\HttpKernel

Code

protected function getContainerBuilder() : ContainerBuilder {
    $container = new ContainerBuilder();
    $container->getParameterBag()
        ->add($this->getKernelParameters());
    if ($this instanceof ExtensionInterface) {
        $container->registerExtension($this);
    }
    if ($this instanceof CompilerPassInterface) {
        $container->addCompilerPass($this, PassConfig::TYPE_BEFORE_OPTIMIZATION, -10000);
    }
    return $container;
}
RSS feed
Powered by Drupal