You are here

function termcase_update_term in Termcase 8

Function to update terms.

Parameters

string $term: The converted term.

string $tid: Id of the term.

string $vid: Id of the vocabulary.

1 call to termcase_update_term()
UpdateTerms::updateAllTerms in src/UpdateTerms.php
Batch process callback.

File

./termcase.module, line 217
The Termcase module gives you the option to specify specific case-formatting on terms.

Code

function termcase_update_term($term, $tid, $vid) {
  \Drupal::database()
    ->update('taxonomy_term_field_data')
    ->fields([
    'name' => $term,
  ])
    ->condition('vid', $vid)
    ->condition('tid', $tid)
    ->execute();
}