taxonomy_vocabulary_get_names
function taxonomy_vocabulary_get_names
taxonomy_vocabulary_get_names()
Get names for all taxonomy vocabularies.
Return value
An associative array of objects keyed by vocabulary machine name with information about taxonomy vocabularies. Each object has properties:
- name: The vocabulary name.
- machine_name: The machine name.
- vid: The vocabulary ID.
File
- modules/taxonomy/taxonomy.module, line 998
- Enables the organization of content into categories.
Code
function taxonomy_vocabulary_get_names() { $names = &drupal_static(__FUNCTION__); if (!isset($names)) { $names = db_query('SELECT name, machine_name, vid FROM {taxonomy_vocabulary}')->fetchAllAssoc('machine_name'); } return $names; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.module/function/taxonomy_vocabulary_get_names/7.x