function BigPipeTestController::currentTime
Same name in other branches
- 9 core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php \Drupal\big_pipe_test\BigPipeTestController::currentTime()
- 8.9.x core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php \Drupal\big_pipe_test\BigPipeTestController::currentTime()
- 11.x core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php \Drupal\big_pipe_test\BigPipeTestController::currentTime()
#lazy_builder callback; builds <time> markup with current time.
Note: does not actually use current time, that would complicate testing.
Return value
array
File
-
core/
modules/ big_pipe/ tests/ modules/ big_pipe_test/ src/ BigPipeTestController.php, line 129
Class
- BigPipeTestController
- Returns responses for Big Pipe routes.
Namespace
Drupal\big_pipe_testCode
public static function currentTime() {
return [
'#markup' => '<time datetime="' . date('Y-m-d', 668948400) . '"></time>',
'#cache' => [
'max-age' => 0,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.