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

Breadcrumb

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

function DrupalKernel::attachSynthetic

Attach synthetic values on to kernel.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: Container object

Return value

\Symfony\Component\DependencyInjection\ContainerInterface

3 calls to DrupalKernel::attachSynthetic()
DrupalKernel::initializeContainer in core/lib/Drupal/Core/DrupalKernel.php
Initializes the service container.
InstallerKernel::attachSynthetic in core/lib/Drupal/Core/Installer/InstallerKernel.php
Attach synthetic values on to kernel.
InstallerKernel::attachSynthetic in core/lib/Drupal/Core/Installer/InstallerKernel.php
Attach synthetic values on to kernel.
1 method overrides DrupalKernel::attachSynthetic()
InstallerKernel::attachSynthetic in core/lib/Drupal/Core/Installer/InstallerKernel.php
Attach synthetic values on to kernel.

File

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

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

protected function attachSynthetic(ContainerInterface $container) {
    $persist = [];
    if (isset($this->container)) {
        $persist = $this->getServicesToPersist($this->container);
    }
    $this->persistServices($container, $persist);
    // All namespaces must be registered before we attempt to use any service
    // from the container.
    $this->classLoaderAddMultiplePsr4($container->getParameter('container.namespaces'));
    $container->set('kernel', $this);
    // Set the class loader which was registered as a synthetic service.
    $container->set('class_loader', $this->classLoader);
    return $container;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal