function tripal_vocabulary_import_form_validate
3.x tripal.admin.inc | tripal_vocabulary_import_form_validate($form, &$form_state) |
_state
Parameters
$form:
File
- tripal/
includes/ tripal.admin.inc, line 111
Code
function tripal_vocabulary_import_form_validate($form, &$form_state) {
// TODO: we need some sort of administrative interface that lets the user
// switch to the desired vocabulary type. For now, we'll just use the
// first one in the list.
$stores = module_invoke_all('vocab_storage_info');
if (is_array($stores) and count($stores) > 0) {
$keys = array_keys($stores);
$module = $stores[$keys[0]]['module'];
$function = $module . '_vocab_import_form_validate';
if (function_exists($function)) {
$form = $function($form, $form_state);
}
else {
drupal_set_message("The function '$function' is not implemented. Cannot import vocabularies.", 'error');
}
}
else {
tripal_set_message('A storage backend is not enabled for managing
the vocabulary terms used to create content. Please enable
a module that supports storage of vocabualary terms (e.g. tripal_chado)
and return to create new Tripal content types.', TRIPAL_NOTICE);
}
return $form;
}