function tripal_mviews_form_submit
2.x tripal_core.mviews.inc | tripal_mviews_form_submit($form, &$form_state) |
3.x tripal_chado.mviews.inc | tripal_mviews_form_submit($form, &$form_state) |
1.x mviews.inc | tripal_mviews_form_submit($form, &$form_state) |
Submit the Create/Edit Materialized View Form Implements hook_form_submit().
Related topics
File
- tripal_core/
includes/ mviews.inc, line 399 - Contains functions for viewing and editing of Materialized Views on a Tripal website.
Code
function tripal_mviews_form_submit($form, &$form_state) {
$ret = array();
$action = $form_state['values']['action'];
$mview_id = $form_state['values']['mview_id'];
$name = $form_state['values']['name'];
$mv_table = $form_state['values']['mv_table'];
$mv_specs = $form_state['values']['mv_specs'];
$indexed = $form_state['values']['indexed'];
$query = $form_state['values']['mvquery'];
$special_index = $form_state['values']['special_index'];
$comment = $form_state['values']['comment'];
$schema = $form_state['values']['schema'];
$modulename = $form_state['values']['modulename'];
if (!$modulename) {
$modulename = 'tripal_core';
}
if (strcmp($action, 'Edit') == 0) {
tripal_edit_mview($mview_id, $name, $modulename, $mv_table, $mv_specs,
$indexed, $query, $special_index, $comment, $schema);
}
elseif (strcmp($action, 'Add') == 0) {
tripal_add_mview($name, $modulename, $mv_table, $mv_specs,
$indexed, $query, $special_index, $comment, $schema);
}
else {
drupal_set_message(t("No action performed."));
}
return '';
}