You are here

public static function RecursivePlaceholdersTest::callback in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php \Drupal\Tests\Core\Render\RecursivePlaceholdersTest::callback()
  2. 9 core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php \Drupal\Tests\Core\Render\RecursivePlaceholdersTest::callback()

#lazy_builder callback; bubbles another placeholder.

Parameters

string $animal: An animal.

Return value

array A renderable array.

File

core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php, line 1173
Contains \Drupal\Tests\Core\Render\RendererPlaceholdersTest.

Class

RecursivePlaceholdersTest

Namespace

Drupal\Tests\Core\Render

Code

public static function callback($animal) {
  return [
    'another' => [
      '#create_placeholder' => TRUE,
      '#lazy_builder' => [
        'Drupal\\Tests\\Core\\Render\\PlaceholdersTest::callback',
        [
          $animal,
        ],
      ],
    ],
  ];
}