Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/DrupalKernel.php \Drupal\Core\DrupalKernel::getContainer()
  2. 9 core/lib/Drupal/Core/DrupalKernel.php \Drupal\Core\DrupalKernel::getContainer()

Gets the current container.

Return value

\Symfony\Component\DependencyInjection\ContainerInterface A ContainerInterface instance.

Overrides DrupalKernelInterface::getContainer

6 calls to DrupalKernel::getContainer()
TestRunnerKernel::boot in core/lib/Drupal/Core/Test/TestRunnerKernel.php
Boots the current kernel.
UpdateKernel::bootSession in core/lib/Drupal/Core/Update/UpdateKernel.php
Boots up the session.
UpdateKernel::handle in core/lib/Drupal/Core/Update/UpdateKernel.php
UpdateKernel::handleAccess in core/lib/Drupal/Core/Update/UpdateKernel.php
Checks if the current user has rights to access updates page.
UpdateKernel::handleRaw in core/lib/Drupal/Core/Update/UpdateKernel.php
Generates the actual result of update.php.

... See full list

File

core/lib/Drupal/Core/DrupalKernel.php, line 548

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

public function getContainer() {
  return $this->container;
}