function taxonomy_test_entity_view

Implements hook_entity_view().

File

modules/simpletest/tests/taxonomy_test.module, line 76

Code

function taxonomy_test_entity_view($entity, $type, $view_mode, $langcode) {
    if ($type == 'taxonomy_term' && $view_mode == 'full') {
        $entity->content['taxonomy_test_entity_view_check'] = array(
            '#prefix' => '<div>',
            '#markup' => t('The antonym is %antonym', array(
                '%antonym' => $entity->antonym,
            )),
            '#suffix' => '</div>',
            '#weight' => 20,
        );
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.