private function TermMerger::assertTermsNotEmpty in Term Merge 8
Asserts that the termsToAssert variable is not empty.
Parameters
\Drupal\taxonomy\TermInterface[] $termsToAssert: The array to assert.
1 call to TermMerger::assertTermsNotEmpty()
- TermMerger::validateTerms in src/
TermMerger.php - Asserts that all passed in terms are valid.
File
- src/
TermMerger.php, line 147
Class
- TermMerger
- Implements TermMergerInterface to provide a term merger service.
Namespace
Drupal\term_mergeCode
private function assertTermsNotEmpty(array $termsToAssert) {
if (empty($termsToAssert)) {
throw new \RuntimeException('You must provide at least 1 term');
}
}