function DrupalKernel::collectServiceIdMapping

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

Collect a mapping between service to ids.

Deprecated

in drupal:9.5.1 and is removed from drupal:11.0.0. Use the 'Drupal\Component\DependencyInjection\ReverseContainer' service instead.

See also

https://www.drupal.org/node/3327942

1 call to DrupalKernel::collectServiceIdMapping()
DrupalKernel::getServiceIdMapping in core/lib/Drupal/Core/DrupalKernel.php
Get a mapping from service hashes to service IDs.

File

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

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

protected function collectServiceIdMapping() {
    @trigger_error(__METHOD__ . "() is deprecated in drupal:9.5.1 and is removed from drupal:11.0.0. Use the 'Drupal\\Component\\DependencyInjection\\ReverseContainer' service instead. See https://www.drupal.org/node/3327942", E_USER_DEPRECATED);
    if (isset($this->container)) {
        foreach ($this->container
            ->getServiceIdMappings() as $hash => $service_id) {
            $this->serviceIdMapping[$hash] = $service_id;
        }
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.