function testing_example_test_node_view
Same name in other branches
- 3.x modules/testing_example/tests/modules/testing_example_test/testing_example_test.module \testing_example_test_node_view()
Implements hook_ENTITY_TYPE_view().
We'll just add some content to nodes of the type we like.
Related topics
File
-
modules/
testing_example/ tests/ modules/ testing_example_test/ testing_example_test.module, line 27
Code
function testing_example_test_node_view(array &$build, EntityInterface $node, EntityViewDisplayInterface $display, $view_mode) {
if ($node->getType() == 'testing_example') {
$build['simpletest_example_test_section'] = [
'#markup' => t('The test module did its thing.'),
'#weight' => -99,
];
}
}