You are here

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

Submit handler to enable a disabled display.

File

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

Class

ViewUI
Stores UI related temporary settings.

Namespace

Drupal\views_ui

Code

public function submitDisplayEnable($form, &$form_state) {
  $id = $form_state['display_id'];

  // setOption doesn't work because this would might affect upper displays
  $this->displayHandlers[$id]
    ->setOption('enabled', TRUE);

  // 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;
}