function microdata_vocabulary_settings in Microdata 7
Form builder; The microdata vocabulary settings form.
1 string reference to 'microdata_vocabulary_settings'
- microdata_menu in ./
microdata.module - Implements hook_menu().
File
- ./
microdata.admin.inc, line 11 - Microdata administration and module settings UI.
Code
function microdata_vocabulary_settings() {
$options = array();
$enabled_vocabs = microdata_get_enabled_vocabularies();
$form['enabled_vocabs']['#tree'] = TRUE;
foreach (microdata_get_vocabulary_info() as $vocab_name => $vocab) {
$label = $vocab['label'];
$description = isset($vocab['description']) ? $vocab['description'] : '';
$form['enabled_vocabs'][$vocab_name] = array(
'#type' => 'checkbox',
'#title' => $label,
'#description' => $description,
'#default_value' => isset($enabled_vocabs[$vocab_name]) ? $vocab_name : '',
'#return_value' => $vocab_name,
);
}
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
$form['actions']['refresh_cache'] = array(
'#type' => 'submit',
'#value' => t('Refresh vocabulary cache'),
'#submit' => array(
'microdata_vocabulary_settings_refresh_vocabulary_cache',
),
);
return $form;
}