private function MenuTree::menuItemInChildrenLeafs in Taxonomy Facets 8
Check if selected filer is somewhere in the children leafs.
1 call to MenuTree::menuItemInChildrenLeafs()
File
- src/
MenuTree.php, line 188
Class
Namespace
Drupal\taxonomy_facetsCode
private function menuItemInChildrenLeafs($tid) {
$all_children = \Drupal::entityTypeManager()
->getStorage('taxonomy_term')
->loadTree($this->vid, $tid);
foreach ($all_children as $child) {
if ($this->tidSelected == $child->tid) {
return TRUE;
}
}
return FALSE;
}