function merci_add_group_taxonomy in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.2
Same name and namespace in other branches
- 6.2 merci.install \merci_add_group_taxonomy()
@todo Please document this function.
See also
1 call to merci_add_group_taxonomy()
- merci_enable in ./
merci.install - Implements hook_enable().
File
- ./
merci.install, line 586 - merci Installer / Uninstaller
Code
function merci_add_group_taxonomy() {
// borrowed from Forum module
// Create the forum vocabulary if it does not exist. Assign the vocabulary
// a low weight so it will appear first in forum topic create and edit
// forms.
// Delete the vocabulary.
$vid = variable_get('merci_equipment_grouping_vid', 0);
if (!taxonomy_vocabulary_load($vid)) {
$vocabulary = array(
'name' => t('MERCI Equipment Grouping'),
'machine_name' => 'merci_equipment_group',
'description' => 'Taxonomy for grouping buckets and resources',
'multiple' => 0,
'required' => 0,
'hierarchy' => 0,
'relations' => 0,
'module' => 'merci',
'weight' => -10,
);
$vocabulary_obj = (object) $vocabulary;
taxonomy_vocabulary_save($vocabulary_obj);
variable_set('merci_equipment_grouping_vid', $vocabulary_obj->vid);
}
}