function BigPipeTestController::helloOrYarhar

Same name in other branches
  1. 8.9.x core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php \Drupal\big_pipe_test\BigPipeTestController::helloOrYarhar()

#lazy_builder callback; says "hello" or "yarhar".

Return value

array

File

core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php, line 104

Class

BigPipeTestController

Namespace

Drupal\big_pipe_test

Code

public static function helloOrYarhar() {
    return [
        '#markup' => BigPipeMarkup::create('<marquee>Yarhar llamas forever!</marquee>'),
        '#cache' => [
            'max-age' => 0,
            'tags' => [
                'cache_tag_set_in_lazy_builder',
            ],
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.