function tvi_submit_handler in Taxonomy Views Integrator 7
Same name and namespace in other branches
- 8 tvi.module \tvi_submit_handler()
- 6 includes/tvi.admin.inc \tvi_submit_handler()
Save the view taxonomy data to the database.
Parameters
array $form: The form array.
array $form_state: The form state array.
1 string reference to 'tvi_submit_handler'
- tvi_taxonomy_admin_form in includes/
tvi.admin.inc - The main TVI administration form.
File
- includes/
tvi.admin.inc, line 238 - Administration functions for the tvi module.
Code
function tvi_submit_handler($form, &$form_state) {
$settings = (object) $form_state['values']['tvi'];
// Handle the case of the creation form.
if (empty($settings->xid) || $settings->xid == '_autocreate') {
if ($settings->type == TVI_TYPE_VOCAB) {
$settings->xid = $form_state['vocabulary']->vid;
}
elseif ($settings->type == TVI_TYPE_TERM) {
$settings->xid = $form_state['term']->tid;
}
$settings->xid = _tvi_get_xid($settings->xid, $settings->type);
}
if (!$settings->is_default || $settings->status) {
tvi_update_settings($settings);
if ($settings->type == TVI_TYPE_ALL) {
drupal_set_message(t('The configuration options have been saved.'));
}
}
}