You are here

function simpletest_example_test_node_view in Examples for Developers 7

Implements hook_node_view().

We'll just add some content to nodes of the type we like.

Related topics

File

simpletest_example/tests/simpletest_example_test.module, line 24
Implements simpletest_example_test module.

Code

function simpletest_example_test_node_view($node, $view_mode, $langcode) {
  if ($node->type == 'simpletest_example') {
    $node->content['simpletest_example_test_section'] = array(
      '#markup' => t('The test module did its thing.'),
      '#weight' => -99,
    );
  }
}