You are here

public function BigPipeTestController::multiOccurrence in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php \Drupal\big_pipe_test\BigPipeTestController::multiOccurrence()
  2. 9 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,
    ],
  ];
}