You are here

function block_test_block_alter in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/block/tests/modules/block_test/block_test.module \block_test_block_alter()

Implements hook_block_alter().

File

core/modules/block/tests/modules/block_test/block_test.module, line 14
Provide test blocks.

Code

function block_test_block_alter(&$block_info) {
  if (\Drupal::state()
    ->get('block_test_info_alter') && isset($block_info['test_block_instantiation'])) {
    $block_info['test_block_instantiation']['category'] = t('Custom category');
  }
}