function BlockTestHooks::blockAlter
Implements hook_block_alter().
File
-
core/
modules/ block/ tests/ modules/ block_test/ src/ Hook/ BlockTestHooks.php, line 19
Class
- BlockTestHooks
- Hook implementations for block_test.
Namespace
Drupal\block_test\HookCode
public function blockAlter(&$block_info) : void {
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.