public function updateTermHierarchy(EntityInterface
$term) { @
trigger_error(__METHOD__ . '() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. It is a no-op since 8.6.0. Parent references are automatically updated when updating a taxonomy term. See https://www.drupal.org/node/2936675', E_USER_DEPRECATED
);
} /**
* {@inheritdoc}
*/
public function loadParents($tid) { $terms =
[];
/** @var \Drupal\taxonomy\TermInterface $term */
if ($tid &&
$term =
$this->
load($tid)) { foreach ($this->
getParents($term) as $id =>
$parent) { // This method currently doesn't return the <root> parent.
// @see https://www.drupal.org/node/2019905
if (!
empty($id)) { $terms[$id] =
$parent;
} } } return $terms;
}