function UpdateKernel::bootSession

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Update/UpdateKernel.php \Drupal\Core\Update\UpdateKernel::bootSession()
  2. 8.9.x core/lib/Drupal/Core/Update/UpdateKernel.php \Drupal\Core\Update\UpdateKernel::bootSession()
  3. 10 core/lib/Drupal/Core/Update/UpdateKernel.php \Drupal\Core\Update\UpdateKernel::bootSession()

Boots up the session.

This method + shutdownSession() basically simulates what \Drupal\Core\StackMiddleware\Session does.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The incoming request.

1 call to UpdateKernel::bootSession()
UpdateKernel::handle in core/lib/Drupal/Core/Update/UpdateKernel.php

File

core/lib/Drupal/Core/Update/UpdateKernel.php, line 127

Class

UpdateKernel
Defines a kernel which is used primarily to run the update of Drupal.

Namespace

Drupal\Core\Update

Code

protected function bootSession(Request $request) {
    $container = $this->getContainer();
    
    /** @var \Symfony\Component\HttpFoundation\Session\SessionInterface $session */
    $session = $container->get('session');
    $session->start();
    $request->setSession($session);
}

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