public static function BlockRenderAlterContent::preRender in Drupal 10
Same name and namespace in other branches
- 8 core/modules/block/tests/modules/block_test/src/BlockRenderAlterContent.php \Drupal\block_test\BlockRenderAlterContent::preRender()
- 9 core/modules/block/tests/modules/block_test/src/BlockRenderAlterContent.php \Drupal\block_test\BlockRenderAlterContent::preRender()
#pre_render callback for a block to alter its content.
File
- core/
modules/ block/ tests/ modules/ block_test/ src/ BlockRenderAlterContent.php, line 15
Class
- BlockRenderAlterContent
- Implements a trusted preRender callback.
Namespace
Drupal\block_testCode
public static function preRender(array $build) {
$build['#prefix'] = 'Hiya!<br>';
return $build;
}