function _taxonomy_term_depth_get_child_legacy_d85 in Taxonomy Term Depth 8.2
Gets child of the term
Parameters
$tid: Term tid to find its parent
1 call to _taxonomy_term_depth_get_child_legacy_d85()
- taxonomy_term_depth_get_child in ./
taxonomy_term_depth.module - Gets child of the term
File
- ./
taxonomy_term_depth.module, line 191 - Main module file.
Code
function _taxonomy_term_depth_get_child_legacy_d85($tid) {
$tid = Drupal::database()
->query("SELECT tid FROM {taxonomy_term_hierarchy} WHERE parent = :tid", [
':tid' => $tid,
])
->fetchField();
return $tid;
}