function BigPipeRegressionTestController::currentTime
Render API callback: Builds <time> markup with current time.
This function is assigned as a #lazy_builder callback.
Return value
array Render array with a <time> markup with current time and cache settings.
File
-
core/
modules/ big_pipe/ tests/ modules/ big_pipe_regression_test/ src/ BigPipeRegressionTestController.php, line 104
Class
- BigPipeRegressionTestController
- Controller for BigPipe regression tests.
Namespace
Drupal\big_pipe_regression_testCode
public static function currentTime() {
return [
'#markup' => '<time datetime="' . date('Y-m-d', time()) . '"></time>',
'#cache' => [
'max-age' => 0,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.