TermStorageInterface::loadChildren

public TermStorageInterface::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. File core/modules/taxonomy/src/TermStorageInterface.php, line 62 Class TermStorageInterface Defines an interface for taxonomy_term entity storage classes. Namespa

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

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::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);

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::__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::loadTree

public TermStorage::loadTree($vid, $parent = 0, $max_depth = NULL, $load_entities = FALSE) Finds all terms in a given vocabulary ID. Parameters string $vid: Vocabulary ID to retrieve terms for. int $parent: The term ID under which to generate the tree. If 0, generate the tree for the entire vocabulary. int $max_depth: The number of levels of the tree to return. Leave NULL to return all levels. bool $load_entities: If TRUE, a full entity load will occur on the term objects. Otherwise they are p

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::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)) ->