function TermStorage::loadChildren

Same name and namespace in other branches
  1. 9 core/modules/taxonomy/src/TermStorage.php \Drupal\taxonomy\TermStorage::loadChildren()
  2. 8.9.x core/modules/taxonomy/src/TermStorage.php \Drupal\taxonomy\TermStorage::loadChildren()
  3. 10 core/modules/taxonomy/src/TermStorage.php \Drupal\taxonomy\TermStorage::loadChildren()

Overrides TermStorageInterface::loadChildren

File

core/modules/taxonomy/src/TermStorage.php, line 185

Class

TermStorage
Defines a Controller class for taxonomy terms.

Namespace

Drupal\taxonomy

Code

public function loadChildren($tid, $vid = NULL) {
    
    /** @var \Drupal\taxonomy\TermInterface $term */
    return !empty($tid) && ($term = $this->load($tid)) ? $this->getChildren($term) : [];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.