function oa_core_taxonomy_vocabulary in Open Atrium Core 7.2
Returns the named vocabulary Cannot use core taxonomy_vocabulary_machine_name_load because og_vocab alters the query to only return vocabs associated with the current space see issue https://drupal.org/node/2270529
4 calls to oa_core_taxonomy_vocabulary()
- oa_buttons_og_permission in modules/
oa_buttons/ oa_buttons.module - Implements hook_og_permission().
- oa_core_create_term in includes/
oa_core.util.inc - Helper function to create a new Section or Space Type taxonomy term
- oa_core_get_allowed_space_terms in ./
oa_core.module - Helper function to return list of space blueprint term ids allowed to be created.
- oa_core_get_vocab_terms in includes/
oa_core.util.inc - Return terms for a list of vocabularies
File
- includes/
oa_core.util.inc, line 1294 - Code for Utility functions for OpenAtrium spaces
Code
function oa_core_taxonomy_vocabulary($machine_name) {
// EntityFieldQuery is not subject to the
// og_vocab_query_taxonomy_vocabulary_load_multiple_alter() function
$efq = new EntityFieldQuery();
$result = $efq
->entityCondition('entity_type', 'taxonomy_vocabulary')
->propertyCondition('machine_name', $machine_name)
->execute();
return !empty($result['taxonomy_vocabulary']) ? current($result['taxonomy_vocabulary']) : NULL;
}