function TestCallables::lazyBuilder
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\TestCallables::lazyBuilder()
File
-
core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTest.php, line 1265
Class
- TestCallables
- Mock callable for testing the pre_render callback.
Namespace
Drupal\Tests\Core\RenderCode
public static function lazyBuilder(bool $set_type) : array {
$build['content'] = [
'#markup' => 'Content',
];
if ($set_type) {
$build['#type'] = 'details';
}
return $build;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.