You are here

big_pipe_test.module in Drupal 10

Support module for BigPipe testing.

File

core/modules/big_pipe/tests/modules/big_pipe_test/big_pipe_test.module
View source
<?php

/**
 * @file
 * Support module for BigPipe testing.
 */

/**
 * Implements hook_page_top().
 */
function big_pipe_test_page_top(array &$page_top) {

  // Ensure this hook is invoked on every page load.
  $page_top['#cache']['max-age'] = 0;
  $request = \Drupal::request();
  if ($request->query
    ->get('trigger_session')) {
    $request
      ->getSession()
      ->set('big_pipe_test', TRUE);
  }
}

Functions

Namesort descending Description
big_pipe_test_page_top Implements hook_page_top().