You are here

function taxonomy_vocabulary_static_reset in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/taxonomy/taxonomy.module \taxonomy_vocabulary_static_reset()
  2. 7 modules/taxonomy/taxonomy.module \taxonomy_vocabulary_static_reset()

Clear all static cache variables for vocabularies.

Parameters

$ids: An array of ids to reset in the entity cache.

Deprecated

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal::entityTypeManager()->getStorage('taxonomy_vocabulary')->resetCache($ids) instead.

See also

https://www.drupal.org/node/3039041

1 call to taxonomy_vocabulary_static_reset()
TaxonomyDeprecationTest::testTaxonomyDeprecations in core/modules/taxonomy/tests/src/Kernel/TaxonomyDeprecationTest.php

File

core/modules/taxonomy/taxonomy.module, line 180
Enables the organization of content into categories.

Code

function taxonomy_vocabulary_static_reset(array $ids = NULL) {
  @trigger_error('taxonomy_vocabulary_static_reset() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \\Drupal::entityTypeManager()->getStorage("taxonomy_vocabulary")->resetCache($ids) instead. See https://www.drupal.org/node/3039041', E_USER_DEPRECATED);
  \Drupal::entityTypeManager()
    ->getStorage('taxonomy_vocabulary')
    ->resetCache($ids);
}