TermStorageInterface::loadAllParents

public TermStorageInterface::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. File core/modules/taxonomy/src/TermStorageInterface.php, line 49 Class TermStorageInterface Defines an interface for taxonomy_term entity storage classes. Namespace Drupal\taxonomy Code public function loadAllParents($tid);

TermStorageInterface::getNodeTerms

public TermStorageInterface::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. File core/modules/tax

TermStorageInterface::deleteTermHierarchy

public TermStorageInterface::deleteTermHierarchy($tids) Removed reference to terms from term_hierarchy. Parameters array $tids: Array of terms that need to be removed from hierarchy. File core/modules/taxonomy/src/TermStorageInterface.php, line 19 Class TermStorageInterface Defines an interface for taxonomy_term entity storage classes. Namespace Drupal\taxonomy Code public function deleteTermHierarchy($tids);

TermStorageInterface

Defines an interface for taxonomy_term entity storage classes. Hierarchy interface \Drupal\Core\Entity\EntityStorageInterfaceinterface \Drupal\Core\Entity\ContentEntityStorageInterfaceinterface \Drupal\taxonomy\TermStorageInterface File core/modules/taxonomy/src/TermStorageInterface.php, line 11 Namespace Drupal\taxonomy Members Name Modifiers Type Description ContentEntityStorageInterface::createTranslation public function Constructs a new entity translation object, w

TermStorage::__wakeup

public TermStorage::__wakeup() Overrides DependencySerializationTrait::__wakeup File core/modules/taxonomy/src/TermStorage.php, line 361 Class TermStorage Defines a Controller class for taxonomy terms. Namespace Drupal\taxonomy Code public function __wakeup() { parent::__wakeup(); // Initialize static caches. $this->parents = array(); $this->parentsAll = array(); $this->children = array(); $this->treeChildren = array(); $this->treeParents = array(); $this

TermStorage::__sleep

public TermStorage::__sleep() Overrides DependencySerializationTrait::__sleep File core/modules/taxonomy/src/TermStorage.php, line 351 Class TermStorage Defines a Controller class for taxonomy terms. Namespace Drupal\taxonomy Code public function __sleep() { $vars = parent::__sleep(); // Do not serialize static cache. unset($vars['parents'], $vars['parentsAll'], $vars['children'], $vars['treeChildren'], $vars['treeParents'], $vars['treeTerms'], $vars['trees']); return $vars; }

TermStorage::updateTermHierarchy

public TermStorage::updateTermHierarchy(EntityInterface $term) Updates terms hierarchy information with the hierarchy trail of it. Parameters \Drupal\Core\Entity\EntityInterface $term: Term entity that needs to be added to term hierarchy information. Overrides TermStorageInterface::updateTermHierarchy File core/modules/taxonomy/src/TermStorage.php, line 105 Class TermStorage Defines a Controller class for taxonomy terms. Namespace Drupal\taxonomy Code public function updateTermHierarc

TermStorage::resetWeights

public TermStorage::resetWeights($vid) Reset the weights for a given vocabulary ID. Parameters string $vid: Vocabulary ID to retrieve terms for. Overrides TermStorageInterface::resetWeights File core/modules/taxonomy/src/TermStorage.php, line 305 Class TermStorage Defines a Controller class for taxonomy terms. Namespace Drupal\taxonomy Code public function resetWeights($vid) { $this->database->update('taxonomy_term_field_data') ->fields(array('weight' => 0)) ->

TermStorage::resetCache

public TermStorage::resetCache(array $ids = NULL) Resets the internal, static entity cache. Parameters $ids: (optional) If specified, the cache is reset for the entities with the given ids only. Overrides ContentEntityStorageBase::resetCache File core/modules/taxonomy/src/TermStorage.php, line 81 Class TermStorage Defines a Controller class for taxonomy terms. Namespace Drupal\taxonomy Code public function resetCache(array $ids = NULL) { drupal_static_reset('taxonomy_term_count_node

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