function big_pipe_test_page_top
Same name in other branches
- 9 core/modules/big_pipe/tests/modules/big_pipe_test/big_pipe_test.module \big_pipe_test_page_top()
- 8.9.x core/modules/big_pipe/tests/modules/big_pipe_test/big_pipe_test.module \big_pipe_test_page_top()
- 11.x core/modules/big_pipe/tests/modules/big_pipe_test/big_pipe_test.module \big_pipe_test_page_top()
Implements hook_page_top().
File
-
core/
modules/ big_pipe/ tests/ modules/ big_pipe_test/ big_pipe_test.module, line 11
Code
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);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.