public static function BigPipeRegressionTestController::currentTime in Drupal 10
Same name and namespace in other branches
- 8 core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php \Drupal\big_pipe_regression_test\BigPipeRegressionTestController::currentTime()
- 9 core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php \Drupal\big_pipe_regression_test\BigPipeRegressionTestController::currentTime()
#lazy_builder callback; builds <time> markup with current time.
Return value
array
File
- core/
modules/ big_pipe/ tests/ modules/ big_pipe_regression_test/ src/ BigPipeRegressionTestController.php, line 40
Class
Namespace
Drupal\big_pipe_regression_testCode
public static function currentTime() {
return [
'#markup' => '<time datetime="' . date('Y-m-d', time()) . '"></time>',
'#cache' => [
'max-age' => 0,
],
];
}