You are here

function ch_block_content_test_block_content_view_alter in Acquia Content Hub 8

Implements hook_ENTITY_TYPE_view_alter().

File

tests/modules/ch_block_content_test/ch_block_content_test.module, line 26
A dummy module for testing custom block related hooks.

Code

function ch_block_content_test_block_content_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
  $build['#attributes']['class'][] = 'my-very-special-class';
  $build['hook_block_content_view_alter']['#markup'] = '[hook_block_content_view_alter]';
}