function Vocabulary::setHierarchy

Overrides VocabularyInterface::setHierarchy

File

core/modules/taxonomy/src/Entity/Vocabulary.php, line 101

Class

Vocabulary
Defines the taxonomy vocabulary entity.

Namespace

Drupal\taxonomy\Entity

Code

public function setHierarchy($hierarchy) {
    @trigger_error('\\Drupal\\taxonomy\\VocabularyInterface::setHierarchy() is deprecated in Drupal 8.7.x and will be removed before Drupal 9.0.x. Reset the cache of the taxonomy_term storage controller instead.', E_USER_DEPRECATED);
    $this->entityTypeManager()
        ->getStorage('taxonomy_term')
        ->resetCache();
    return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.