You are here

protected function BigPipe::performPreSendTasks in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/big_pipe/src/Render/BigPipe.php \Drupal\big_pipe\Render\BigPipe::performPreSendTasks()
  2. 9 core/modules/big_pipe/src/Render/BigPipe.php \Drupal\big_pipe\Render\BigPipe::performPreSendTasks()

Performs tasks before sending content (and rendering placeholders).

File

core/modules/big_pipe/src/Render/BigPipe.php, line 236

Class

BigPipe
Service for sending an HTML response in chunks (to get faster page loads).

Namespace

Drupal\big_pipe\Render

Code

protected function performPreSendTasks() {

  // The content in the placeholders may depend on the session, and by the
  // time the response is sent (see index.php), the session is already
  // closed. Reopen it for the duration that we are rendering placeholders.
  $this->session
    ->start();
}