function LazyBuilderPlaceholderTest::lazyBuilderCallback
Lazy builder callback.
Attributes
#[TrustedCallback]
Parameters
string $param: A parameter for the callback.
Return value
array A render array.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Render/ LazyBuilderPlaceholderTest.php, line 112
Class
- LazyBuilderPlaceholderTest
- Tests Fiber suspension within Twig templates during placeholder rendering.
Namespace
Drupal\KernelTests\Core\RenderCode
public static function lazyBuilderCallback(string $param) : array {
return [
'#type' => 'container',
'#markup' => 'Lazy builder content with ' . $param,
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.