function BigPipeTestController::multiOccurrence

Same name in other branches
  1. 9 core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php \Drupal\big_pipe_test\BigPipeTestController::multiOccurrence()
  2. 10 core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php \Drupal\big_pipe_test\BigPipeTestController::multiOccurrence()
  3. 11.x core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php \Drupal\big_pipe_test\BigPipeTestController::multiOccurrence()

A page with multiple occurrences of the same placeholder.

Return value

array

See also

\Drupal\Tests\big_pipe\Functional\BigPipeTest::testBigPipeMultiOccurrencePlaceholders()

1 string reference to 'BigPipeTestController::multiOccurrence'
big_pipe_test.routing.yml in core/modules/big_pipe/tests/modules/big_pipe_test/big_pipe_test.routing.yml
core/modules/big_pipe/tests/modules/big_pipe_test/big_pipe_test.routing.yml

File

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

Class

BigPipeTestController

Namespace

Drupal\big_pipe_test

Code

public function multiOccurrence() {
    return [
        'item1' => [
            '#lazy_builder' => [
                static::class . '::counter',
                [],
            ],
            '#create_placeholder' => TRUE,
        ],
        'item2' => [
            '#lazy_builder' => [
                static::class . '::counter',
                [],
            ],
            '#create_placeholder' => TRUE,
        ],
        'item3' => [
            '#lazy_builder' => [
                static::class . '::counter',
                [],
            ],
            '#create_placeholder' => TRUE,
        ],
    ];
}

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