function rdfui_admin_rdf_overview_form_submit in RDF Extensions 7.2
Saves RDF mapping for all fields and node type.
File
- rdfui/
rdfui.module, line 307
Code
function rdfui_admin_rdf_overview_form_submit($form, &$form_state) {
$entity_type = $form_state['build_info']['args'][0];
// @todo somehow $form_state['build_info']['args'][1] is an object for the
// node RDF mapping but a string 'user' for the user RDF mapping.
if (isset($form_state['build_info']['args'][1]->type)) {
$bundle = $form_state['build_info']['args'][1]->type;
}
elseif ($form_state['build_info']['args'][0] == 'taxonomy_term') {
$bundle = $form_state['build_info']['args'][1]->machine_name;
}
else {
$bundle = $form_state['build_info']['args'][1];
}
_rdfui_mapping_save($form_state, $entity_type, $bundle, 'title');
foreach ($form_state['values']['field_names'] as $field_name) {
_rdfui_mapping_save($form_state, $entity_type, $bundle, $field_name);
}
drupal_set_message(t('RDF mappings have been saved.'), 'status');
}