function taxonomy_vocabulary_get_names

Same name and namespace in other branches
  1. 7.x modules/taxonomy/taxonomy.module \taxonomy_vocabulary_get_names()
  2. 8.9.x core/modules/taxonomy/taxonomy.module \taxonomy_vocabulary_get_names()

Get names for all taxonomy vocabularies.

Return value

array A list of existing vocabulary IDs.

Deprecated

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal::entityQuery('taxonomy_vocabulary')->execute() instead.

See also

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

1 call to taxonomy_vocabulary_get_names()
TaxonomyDeprecationTest::testTaxonomyDeprecations in core/modules/taxonomy/tests/src/Kernel/TaxonomyDeprecationTest.php
2 string references to 'taxonomy_vocabulary_get_names'
drupal_static_reset in core/includes/bootstrap.inc
Resets one or all centrally stored static variable(s).
TaxonomyDeprecationTest::testTaxonomyDeprecations in core/modules/taxonomy/tests/src/Kernel/TaxonomyDeprecationTest.php

File

core/modules/taxonomy/taxonomy.module, line 196

Code

function taxonomy_vocabulary_get_names() {
    @trigger_error("taxonomy_vocabulary_get_names() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \\Drupal::entityQuery('taxonomy_vocabulary')->execute() instead. See https://www.drupal.org/node/3039041", E_USER_DEPRECATED);
    return \Drupal::entityQuery('taxonomy_vocabulary')->execute();
}

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