function views_ui_edit_form_submit_delete_display

Submit handler to delete a display from a view.

1 string reference to 'views_ui_edit_form_submit_delete_display'
views_ui_get_display_tab_details in includes/admin.inc
Helper function to get the display details section of the edit UI.

File

includes/admin.inc, line 1418

Code

function views_ui_edit_form_submit_delete_display($form, &$form_state) {
    $view = $form_state['view'];
    $display_id = $form_state['display_id'];
    // Mark the display for deletion.
    $view->display[$display_id]->deleted = TRUE;
    views_ui_cache_set($view);
    // Redirect to the top-level edit page. The first remaining display will
    // become the active display.
    $form_state['redirect'] = 'admin/structure/views/view/' . $view->name;
}