You are here

private function TermMerger::validateTerms in Term Merge 8

Asserts that all passed in terms are valid.

Parameters

\Drupal\taxonomy\TermInterface[] $termsToAssert: The array to assert.

2 calls to TermMerger::validateTerms()
TermMerger::mergeIntoNewTerm in src/TermMerger.php
Merges two or more terms into a new term.
TermMerger::mergeIntoTerm in src/TermMerger.php
Merges one or more terms into an existing term.

File

src/TermMerger.php, line 116

Class

TermMerger
Implements TermMergerInterface to provide a term merger service.

Namespace

Drupal\term_merge

Code

private function validateTerms(array $termsToAssert) {
  $this
    ->assertTermsNotEmpty($termsToAssert);
  $this
    ->assertAllTermsHaveSameVocabulary($termsToAssert);
}