function BlockTestHooks::blockViewPageTitleBlockAlter
Implements hook_block_view_BASE_BLOCK_ID_alter().
Attributes
#[Hook('block_view_page_title_block_alter')]
See also
\Drupal\Tests\block\Kernel\BlockViewBuilderTest::testBlockViewBuilderCacheTitleBlock()
File
-
core/
modules/ block/ tests/ modules/ block_test/ src/ Hook/ BlockTestHooks.php, line 44
Class
- BlockTestHooks
- Hook implementations for block_test.
Namespace
Drupal\block_test\HookCode
public function blockViewPageTitleBlockAlter(array &$build, BlockPluginInterface $block) : void {
$build['#cache']['tags'][] = 'custom_cache_tag';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.