Creating one of each term is quite enough, thanks
This commit is contained in:
parent
0f38648507
commit
aa510febea
1 changed files with 5 additions and 0 deletions
|
@ -90,6 +90,11 @@ function migration_helpers_move_terms(
|
||||||
$new_term->save();
|
$new_term->save();
|
||||||
$tid = $new_term->id();
|
$tid = $new_term->id();
|
||||||
\Drupal::logger('mass')->log(LogLevel::INFO, "Term $term_name created with TID $tid in vocabulary $destination_vocabulary.");
|
\Drupal::logger('mass')->log(LogLevel::INFO, "Term $term_name created with TID $tid in vocabulary $destination_vocabulary.");
|
||||||
|
|
||||||
|
// Because we did the query only once, before we entered this loop, we
|
||||||
|
// need to add our newly created terms to the term data array we use to
|
||||||
|
// check for existing terms… or we'll keep creating duplicates.
|
||||||
|
$term_data[$new_term->id()] = $new_term->label();
|
||||||
}
|
}
|
||||||
$tids[] = $tid;
|
$tids[] = $tid;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue