You are here

function views_ui_add_display_form_submit in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 6.3 includes/admin.inc \views_ui_add_display_form_submit()

Submit handler to add a display to a view.

1 string reference to 'views_ui_add_display_form_submit'
views_ui_add_display_form in includes/admin.inc
Form to add a display to a view.

File

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

Code

function views_ui_add_display_form_submit($form, &$form_state) {

  // Create the new display
  $plugin = $form_state['values']['display'];
  $form_state['id'] = $form_state['view']
    ->add_display($plugin);

  // Store in cache
  views_ui_cache_set($form_state['view']);

  // Send it back
  $form_state['redirect'] = array(
    'admin/build/views/edit/' . $form_state['view']->name,
    NULL,
    'views-tab-' . $form_state['id'],
  );
}