function taxonomy_vocabulary_machine_name_load

Return the taxonomy vocabulary entity matching a vocabulary machine name.

Parameters

$name: The vocabulary's machine name.

Return value

Drupal\taxonomy\Plugin\Core\Entity\Vocabulary|false The taxonomy vocabulary entity, if exists, FALSE otherwise. Results are statically cached.

See also

taxonomy_vocabulary_load()

7 calls to taxonomy_vocabulary_machine_name_load()
forum_enable in drupal/core/modules/forum/forum.install
Implements hook_enable().
TaxonomyAutocompleteWidget::massageFormValues in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/widget/TaxonomyAutocompleteWidget.php
Implements Drupal\field\Plugin\Type\Widget\WidgetInterface::massageFormValues()
TaxonomyIndexTid::value_form in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php
Options form subform for setting options.
taxonomy_allowed_values in drupal/core/modules/taxonomy/taxonomy.module
Returns the set of valid terms for a taxonomy field.
taxonomy_help in drupal/core/modules/taxonomy/taxonomy.module
Implements hook_help().

... See full list

1 string reference to 'taxonomy_vocabulary_machine_name_load'
VocabularyFormController::form in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php
Overrides Drupal\Core\Entity\EntityFormController::form().

File

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

Code

function taxonomy_vocabulary_machine_name_load($name) {
  $result = entity_load_multiple_by_properties('taxonomy_vocabulary', array(
    'machine_name' => $name,
  ));
  return reset($result);
}