public static function TaxonomyManagerTree::isRoot in Taxonomy Manager 2.0.x
Same name and namespace in other branches
- 8 src/Element/TaxonomyManagerTree.php \Drupal\taxonomy_manager\Element\TaxonomyManagerTree::isRoot()
Helper function to check whether a given term is a root term.
1 call to TaxonomyManagerTree::isRoot()
- TaxonomyManagerTree::getFirstPath in src/
Element/ TaxonomyManagerTree.php - Helper function to calculate path.
File
- src/
Element/ TaxonomyManagerTree.php, line 269
Class
- TaxonomyManagerTree
- Taxonomy Manager Tree Form Element.
Namespace
Drupal\taxonomy_manager\ElementCode
public static function isRoot($tid) {
return empty(static::getTermStorage()
->loadParents($tid));
}