function _ctools_term_vocabulary_machine_name_convert in Chaos Tool Suite (ctools) 7
Helper function to convert convert legacy vocabulary ids into machine names.
Parameters
array $vids: Array of either vids.
Return value
array A keyed array of machine names.
3 calls to _ctools_term_vocabulary_machine_name_convert()
- ctools_term_context in plugins/
arguments/ term.inc - Discover if this argument gives us the term we crave.
- ctools_term_settings_form in plugins/
arguments/ term.inc - Settings form for the argument.
- _term_depth_convert_config_vid_to_vocabulary_name in term_depth/
plugins/ access/ term_depth.inc
File
- plugins/
arguments/ term.inc, line 196 - Plugin to provide an argument handler for a Taxonomy term.
Code
function _ctools_term_vocabulary_machine_name_convert($vids) {
$vocabularies = taxonomy_vocabulary_load_multiple($vids);
$return = array();
foreach ($vocabularies as $vocabulary) {
$return[$vocabulary->machine_name] = $vocabulary->machine_name;
}
return $return;
}