private function TermMerger::migrateReferences in Term Merge 8
Updates the term references on all entities referencing multiple terms.
Parameters
\Drupal\taxonomy\TermInterface[] $fromTerms: The terms to migrate away from.
\Drupal\taxonomy\TermInterface $toTerm: The term to migrate to.
1 call to TermMerger::migrateReferences()
- TermMerger::mergeIntoTerm in src/
TermMerger.php - Merges one or more terms into an existing term.
File
- src/
TermMerger.php, line 161
Class
- TermMerger
- Implements TermMergerInterface to provide a term merger service.
Namespace
Drupal\term_mergeCode
private function migrateReferences(array $fromTerms, TermInterface $toTerm) {
foreach ($fromTerms as $fromTerm) {
$this->migrator
->migrateReference($fromTerm, $toTerm);
}
}