You are here

protected function UpdateKernel::shutdownSession in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Update/UpdateKernel.php \Drupal\Core\Update\UpdateKernel::shutdownSession()
  2. 9 core/lib/Drupal/Core/Update/UpdateKernel.php \Drupal\Core\Update\UpdateKernel::shutdownSession()

Ensures that the session is saved.

Parameters

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

File

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

Class

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

Namespace

Drupal\Core\Update

Code

protected function shutdownSession(Request $request) {
  if ($request
    ->hasSession()) {
    $request
      ->getSession()
      ->save();
  }
}