function hook_taxonomy_vocabulary_presave
Act on taxonomy vocabularies before they are saved.
Modules implementing this hook can act on the vocabulary object before it is inserted or updated.
Parameters
$vocabulary: A taxonomy vocabulary object.
Related topics
3 functions implement hook_taxonomy_vocabulary_presave()
Note: the procedural functions in this list are found by pattern matching, so the list may include some functions that are not actually implementations of this hook.
- EntityCrudHookTestHooks::taxonomyVocabularyPresave in core/
modules/ system/ tests/ modules/ entity_crud_hook_test/ src/ Hook/ EntityCrudHookTestHooks.php - Implements hook_ENTITY_TYPE_presave() for taxonomy_vocabulary entities.
- entity_crud_hook_test_taxonomy_vocabulary_presave in modules/
simpletest/ tests/ entity_crud_hook_test.module - Implements hook_taxonomy_vocabulary_presave().
- TaxonomyCrudHooks::taxonomyVocabularyPresave in core/
modules/ taxonomy/ tests/ modules/ taxonomy_crud/ src/ Hook/ TaxonomyCrudHooks.php - Implements hook_ENTITY_TYPE_presave() for taxonomy_vocabulary entities.
1 invocation of hook_taxonomy_vocabulary_presave()
- taxonomy_vocabulary_save in modules/
taxonomy/ taxonomy.module - Saves a vocabulary.
File
-
modules/
taxonomy/ taxonomy.api.php, line 41
Code
function hook_taxonomy_vocabulary_presave($vocabulary) {
$vocabulary->foo = 'bar';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.