function MigrateTestTrait::getParentIDs
Same name in other branches
- 11.x core/modules/forum/tests/src/Kernel/Migrate/MigrateTestTrait.php \Drupal\Tests\forum\Kernel\Migrate\MigrateTestTrait::getParentIDs()
Retrieves the parent term IDs for a given term.
Parameters
$tid: ID of the term to check.
Return value
array List of parent term IDs.
File
-
core/
modules/ forum/ tests/ src/ Kernel/ Migrate/ MigrateTestTrait.php, line 73
Class
- MigrateTestTrait
- Common assertions for migration tests.
Namespace
Drupal\Tests\forum\Kernel\MigrateCode
protected function getParentIDs($tid) {
return array_keys(\Drupal::entityTypeManager()->getStorage('taxonomy_term')
->loadParents($tid));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.