function termcase_taxonomy_vocabulary_delete in Termcase 8
Same name and namespace in other branches
- 7 termcase.module \termcase_taxonomy_vocabulary_delete()
Implements hook_ENTITY_TYPE_delete(). Remove Termcase settings when vocabularies are deleted.
Parameters
EntityInterface $entity:
File
- ./
termcase.module, line 142 - The Termcase module gives you the option to specify specific case-formatting on terms.
Code
function termcase_taxonomy_vocabulary_delete(EntityInterface $entity) {
Drupal::configFactory()
->getEditable('termcase.settings')
->clear('termcase_update_terms_' . $entity
->id())
->save();
Drupal::configFactory()
->getEditable('termcase.settings')
->clear('termcase_options_' . $entity
->id())
->save();
}