1 taxonomy_test.module taxonomy_test_taxonomy_term_update(TaxonomyTerm $term)

Implements hook_taxonomy_term_update().

File

core/modules/simpletest/tests/taxonomy_test.module, line 39
Test module for Taxonomy hooks and functions not used in core.

Code

function taxonomy_test_taxonomy_term_update(TaxonomyTerm $term) {
  if (!empty($term->antonym)) {
    db_merge('taxonomy_term_antonym')
      ->key(array('tid' => $term->tid))
      ->fields(array(
        'name' => trim($term->antonym)
      ))
      ->execute();
  }
}