function views_ui_add_form_store_edit_submit

Process the add view form, 'continue'.

1 string reference to 'views_ui_add_form_store_edit_submit'
views_ui_add_form in includes/admin.inc
Form builder for the "add new view" page.

File

includes/admin.inc, line 746

Code

function views_ui_add_form_store_edit_submit($form, &$form_state) {
    try {
        $view = $form_state['wizard_instance']->create_view($form, $form_state);
    } catch (ViewsWizardException $e) {
        drupal_set_message($e->getMessage(), 'error');
        $form_state['redirect'] = 'admin/structure/views';
    }
    // Just cache it temporarily to edit it.
    views_ui_cache_set($view);
    // If there is a destination query, ensure we still redirect the user to the
    // edit view page, and then redirect the user to the destination.
    $destination = array();
    if (isset($_GET['destination'])) {
        $destination = drupal_get_destination();
        unset($_GET['destination']);
    }
    $form_state['redirect'] = array(
        'admin/structure/views/view/' . $view->name,
        array(
            'query' => $destination,
        ),
    );
}