protected function DrupalKernel::persistServices in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/DrupalKernel.php \Drupal\Core\DrupalKernel::persistServices()
Moves persistent service instances into a new container.
1 call to DrupalKernel::persistServices()
- DrupalKernel::attachSynthetic in core/
lib/ Drupal/ Core/ DrupalKernel.php - Attach synthetic values on to kernel.
File
- core/
lib/ Drupal/ Core/ DrupalKernel.php, line 1041 - Contains \Drupal\Core\DrupalKernel.
Class
- DrupalKernel
- The DrupalKernel class is the core of Drupal itself.
Namespace
Drupal\CoreCode
protected function persistServices(ContainerInterface $container, array $persist) {
foreach ($persist as $id => $object) {
// Do not override services already set() on the new container, for
// example 'service_container'.
if (!$container
->initialized($id)) {
$container
->set($id, $object);
}
}
}