function block_test_block_alter

Same name in other branches
  1. 9 core/modules/block/tests/modules/block_test/block_test.module \block_test_block_alter()
  2. 10 core/modules/block/tests/modules/block_test/block_test.module \block_test_block_alter()
  3. 11.x 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

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.