function hook_taxonomy_term_presave

Act on taxonomy terms before they are saved.

Modules implementing this hook can act on the term object before it is inserted or updated.

Parameters

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

Related topics

1 function implements hook_taxonomy_term_presave()

File

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

Code

function hook_taxonomy_term_presave(Drupal\taxonomy\Term $term) {
  $term->foo = 'bar';
}