You are here

function views_ui_remove_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_remove_display_form_submit()

Submit handler to add a remove to a display from a view.

1 string reference to 'views_ui_remove_display_form_submit'
views_ui_remove_display_form in includes/admin.inc
Form to remove a display from a view.

File

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

Code

function views_ui_remove_display_form_submit($form, &$form_state) {

  // Create the new display
  $plugin = views_fetch_plugin_data('display', $form_state['view']->display[$form_state['display_id']]->display_plugin);
  if (empty($plugin['no remove'])) {
    $id = $form_state['display_id'];
    $form_state['view']->display[$id]->deleted = TRUE;

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