function hook_taxonomy_term_update

Act on taxonomy terms when updated.

Modules implementing this hook can act on the term object when updated.

Parameters

Drupal\taxonomy\Term $term: A taxonomy term entity.

Related topics

2 functions implement hook_taxonomy_term_update()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

entity_crud_hook_test_taxonomy_term_update in drupal/core/modules/system/tests/modules/entity_crud_hook_test/entity_crud_hook_test.module
Implements hook_taxonomy_term_update().
path_taxonomy_term_update in drupal/core/modules/path/path.module
Implements hook_taxonomy_term_update().

File

drupal/core/modules/taxonomy/taxonomy.api.php, line 208
Hooks provided by the Taxonomy module.

Code

function hook_taxonomy_term_update(Drupal\taxonomy\Term $term) {
  db_insert('mytable')
    ->fields(array(
    'tid' => $term
      ->id(),
    'foo' => $term->foo,
  ))
    ->execute();
}