function BigPipeRegressionTestController::multipleReplacements

Same name in other branches
  1. 11.x core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php \Drupal\big_pipe_regression_test\BigPipeRegressionTestController::multipleReplacements()

A page with multiple nodes.

See also

\Drupal\Tests\big_pipe\FunctionalJavascript\BigPipeRegressionTest::testMultipleReplacements

1 string reference to 'BigPipeRegressionTestController::multipleReplacements'
big_pipe_regression_test.routing.yml in core/modules/big_pipe/tests/modules/big_pipe_regression_test/big_pipe_regression_test.routing.yml
core/modules/big_pipe/tests/modules/big_pipe_regression_test/big_pipe_regression_test.routing.yml

File

core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php, line 57

Class

BigPipeRegressionTestController

Namespace

Drupal\big_pipe_regression_test

Code

public function multipleReplacements() {
    $build = [];
    foreach (range(1, self::PLACEHOLDER_COUNT) as $length) {
        $build[] = [
            '#lazy_builder' => [
                static::class . '::renderRandomSentence',
                [
                    $length,
                ],
            ],
            '#create_placeholder' => TRUE,
        ];
    }
    return $build;
}

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