You are here

public function ViewUI::submitDisplayUndoDelete in Views (for Drupal 7) 8.3

Submit handler to add a restore a removed display to a view.

File

views_ui/lib/Drupal/views_ui/ViewUI.php, line 882
Definition of Drupal\views_ui\ViewUI.

Class

ViewUI
Stores UI related temporary settings.

Namespace

Drupal\views_ui

Code

public function submitDisplayUndoDelete($form, &$form_state) {

  // Create the new display
  $id = $form_state['display_id'];
  $this->storage->display[$id]['deleted'] = FALSE;

  // Store in cache
  views_ui_cache_set($this);

  // Redirect to the top-level edit page.
  $form_state['redirect'] = 'admin/structure/views/view/' . $this->storage->name . '/edit/' . $id;
}