big_pipe_test.module

Same filename in other branches
  1. 9 core/modules/big_pipe/tests/modules/big_pipe_test/big_pipe_test.module
  2. 10 core/modules/big_pipe/tests/modules/big_pipe_test/big_pipe_test.module
  3. 11.x core/modules/big_pipe/tests/modules/big_pipe_test/big_pipe_test.module

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;
    if (\Drupal::request()->query
        ->get('trigger_session')) {
        $_SESSION['big_pipe_test'] = TRUE;
    }
}

Functions

Title Deprecated Summary
big_pipe_test_page_top Implements hook_page_top().

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