class BigPipeTestHooks
Hook implementations for big_pipe_test.
Hierarchy
- class \Drupal\big_pipe_test\Hook\BigPipeTestHooks
Expanded class hierarchy of BigPipeTestHooks
File
-
core/
modules/ big_pipe/ tests/ modules/ big_pipe_test/ src/ Hook/ BigPipeTestHooks.php, line 12
Namespace
Drupal\big_pipe_test\HookView source
class BigPipeTestHooks {
/**
* Implements hook_page_top().
*/
public function pageTop(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);
}
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
BigPipeTestHooks::pageTop | public | function | Implements hook_page_top(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.