class RecursivePlaceholdersTest in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php \Drupal\Tests\Core\Render\RecursivePlaceholdersTest
Hierarchy
- class \Drupal\Tests\Core\Render\RecursivePlaceholdersTest implements TrustedCallbackInterface
Expanded class hierarchy of RecursivePlaceholdersTest
See also
\Drupal\Tests\Core\Render\RendererPlaceholdersTest::testRecursivePlaceholder()
File
- core/
tests/ Drupal/ Tests/ Core/ Render/ RendererPlaceholdersTest.php, line 1146 - Contains \Drupal\Tests\Core\Render\RendererPlaceholdersTest.
Namespace
Drupal\Tests\Core\RenderView source
class RecursivePlaceholdersTest implements TrustedCallbackInterface {
/**
* #lazy_builder callback; bubbles another placeholder.
*
* @param string $animal
* An animal.
*
* @return array
* A renderable array.
*/
public static function callback($animal) {
return [
'another' => [
'#create_placeholder' => TRUE,
'#lazy_builder' => [
'Drupal\\Tests\\Core\\Render\\PlaceholdersTest::callback',
[
$animal,
],
],
],
];
}
/**
* {@inheritdoc}
*/
public static function trustedCallbacks() {
return [
'callback',
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RecursivePlaceholdersTest:: |
public static | function | #lazy_builder callback; bubbles another placeholder. | |
RecursivePlaceholdersTest:: |
public static | function |
Lists the trusted callbacks provided by the implementing class. Overrides TrustedCallbackInterface:: |
|
TrustedCallbackInterface:: |
constant | Untrusted callbacks throw exceptions. | ||
TrustedCallbackInterface:: |
constant | Untrusted callbacks trigger silenced E_USER_DEPRECATION errors. | ||
TrustedCallbackInterface:: |
constant | Untrusted callbacks trigger E_USER_WARNING errors. |