You are here

public static function BigPipeTestController::currentTime in Drupal 8

Same name and namespace in other branches
  1. 9 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 92

Class

BigPipeTestController

Namespace

Drupal\big_pipe_test

Code

public static function currentTime() {
  return [
    '#markup' => '<time datetime="' . date('Y-m-d', 668948400) . '"></time>',
    '#cache' => [
      'max-age' => 0,
    ],
  ];
}