function views_ui_edit_form_submit_add_display

3.x admin.inc views_ui_edit_form_submit_add_display($form, &$form_state)

Submit handler to add a display to a view.

1 string reference to 'views_ui_edit_form_submit_add_display'
views_ui_render_display_top in includes/admin.inc
Render the top of the display so it can be updated during ajax operations.

File

includes/admin.inc, line 1323
Provides the Views' administrative interface.

Code

function views_ui_edit_form_submit_add_display($form, &$form_state) {
  $view = $form_state['view'];

  // Create the new display.
  $parents = $form_state['triggering_element']['#parents'];
  $display_type = array_pop($parents);
  $display_id = $view->add_display($display_type);
  views_ui_cache_set($view);

  // Redirect to the new display's edit page.
  $form_state['redirect'] = 'admin/structure/views/view/' . $view->name . '/edit/' . $display_id;
}