function block_test_block_alter
Implements hook_block_alter().
File
- 
              core/modules/ block/ tests/ modules/ block_test/ block_test.module, line 14 
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');
  }
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
