function 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_test

Code

public static function preRender(array $build) {
  $build['#prefix'] = 'Hiya!<br>';
  return $build;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.