TermStorage::nodeCount

public TermStorage::nodeCount($vid) Count the number of nodes in a given vocabulary ID. Parameters string $vid: Vocabulary ID to retrieve terms for. Return value int A count of the nodes in a given vocabulary ID. Overrides TermStorageInterface::nodeCount File core/modules/taxonomy/src/TermStorage.php, line 293 Class TermStorage Defines a Controller class for taxonomy terms. Namespace Drupal\taxonomy Code public function nodeCount($vid) { $query = $this->database->select('taxo

TermStorage::deleteTermHierarchy

public TermStorage::deleteTermHierarchy($tids) Removed reference to terms from term_hierarchy. Parameters array $tids: Array of terms that need to be removed from hierarchy. Overrides TermStorageInterface::deleteTermHierarchy File core/modules/taxonomy/src/TermStorage.php, line 96 Class TermStorage Defines a Controller class for taxonomy terms. Namespace Drupal\taxonomy Code public function deleteTermHierarchy($tids) { $this->database->delete('taxonomy_term_hierarchy') -&g

TermStorage::loadParents

public TermStorage::loadParents($tid) Finds all parents of a given term ID. Parameters int $tid: Term ID to retrieve parents for. Return value \Drupal\taxonomy\TermInterface[] An array of term objects which are the parents of the term $tid. Overrides TermStorageInterface::loadParents File core/modules/taxonomy/src/TermStorage.php, line 121 Class TermStorage Defines a Controller class for taxonomy terms. Namespace Drupal\taxonomy Code public function loadParents($tid) { if (!isset($

TermStorage::getNodeTerms

public TermStorage::getNodeTerms(array $nids, array $vocabs = array(), $langcode = NULL) Returns all terms used to tag some given nodes. Parameters array $nids: Node IDs to retrieve terms for. array $vocabs: (optional) A vocabularies array to restrict the term search. Defaults to empty array. string $langcode: (optional) A language code to restrict the term search. Defaults to NULL. Return value array An array of nids and the term entities they were tagged with. Overrides TermStorageInterface

TermStorage::loadAllParents

public TermStorage::loadAllParents($tid) Finds all ancestors of a given term ID. Parameters int $tid: Term ID to retrieve ancestors for. Return value \Drupal\taxonomy\TermInterface[] An array of term objects which are the ancestors of the term $tid. Overrides TermStorageInterface::loadAllParents File core/modules/taxonomy/src/TermStorage.php, line 143 Class TermStorage Defines a Controller class for taxonomy terms. Namespace Drupal\taxonomy Code public function loadAllParents($tid) {

TermStorage::loadChildren

public TermStorage::loadChildren($tid, $vid = NULL) Finds all children of a term ID. Parameters int $tid: Term ID to retrieve parents for. string $vid: An optional vocabulary ID to restrict the child search. Return value \Drupal\taxonomy\TermInterface[] An array of term objects that are the children of the term $tid. Overrides TermStorageInterface::loadChildren File core/modules/taxonomy/src/TermStorage.php, line 170 Class TermStorage Defines a Controller class for taxonomy terms. Name

TermStorage::$treeChildren

Array of term ancestors keyed by vocabulary ID and parent term ID. Type: array File core/modules/taxonomy/src/TermStorage.php, line 46 Class TermStorage Defines a Controller class for taxonomy terms. Namespace Drupal\taxonomy Code protected $treeChildren = array();

TermStorage::$treeTerms

Array of terms in a tree keyed by vocabulary ID and term ID. Type: array File core/modules/taxonomy/src/TermStorage.php, line 53 Class TermStorage Defines a Controller class for taxonomy terms. Namespace Drupal\taxonomy Code protected $treeTerms = array();

TermStorage::$treeParents

Array of term parents keyed by vocabulary ID and child term ID. Type: array File core/modules/taxonomy/src/TermStorage.php, line 39 Class TermStorage Defines a Controller class for taxonomy terms. Namespace Drupal\taxonomy Code protected $treeParents = array();

TermStorage::$trees

Array of loaded trees keyed by a cache id matching tree arguments. Type: array File core/modules/taxonomy/src/TermStorage.php, line 60 Class TermStorage Defines a Controller class for taxonomy terms. Namespace Drupal\taxonomy Code protected $trees = array();