Update Taxonomy Vocabulary : Alle Terms
<?php
$query = \Drupal::entityQuery('taxonomy_term');
$query->condition('vid', 'my_taxonomy_vocabulary');
$result = $query->execute();
foreach($result as $term_id) {
$term = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->load($term_id);
$term_name = $term->getName();
$value = $term_name . " added new value";
$term->setName($value);
$term->save();
}
Neuen Kommentar schreiben