function taxonomy_vocabulary_load in Drupal 8
Same name and namespace in other branches
- 6 modules/taxonomy/taxonomy.module \taxonomy_vocabulary_load()
- 7 modules/taxonomy/taxonomy.module \taxonomy_vocabulary_load()
Return the taxonomy vocabulary entity matching a vocabulary ID.
Parameters
int $vid: The vocabulary's ID.
Return value
\Drupal\taxonomy\Entity\Vocabulary|null The taxonomy vocabulary entity, if exists, NULL otherwise. Results are statically cached.
Deprecated
in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\taxonomy\Entity\Vocabulary::load().
See also
https://www.drupal.org/node/2266845
1 call to taxonomy_vocabulary_load()
- TaxonomyLegacyTest::testEntityLegacyCode in core/
modules/ taxonomy/ tests/ src/ Kernel/ TaxonomyLegacyTest.php - @expectedDeprecation taxonomy_term_load_multiple() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\taxonomy\Entity\Term::loadMultiple(). See https://www.drupal.org/node/2266845 @expectedDeprecation…
File
- core/
modules/ taxonomy/ taxonomy.module, line 436 - Enables the organization of content into categories.
Code
function taxonomy_vocabulary_load($vid) {
@trigger_error('taxonomy_vocabulary_load() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \\Drupal\\taxonomy\\Entity\\Vocabulary::load(). See https://www.drupal.org/node/2266845', E_USER_DEPRECATED);
return Vocabulary::load($vid);
}