You are here

public function ViewUI::standardCancel in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views_ui/src/ViewUI.php \Drupal\views_ui\ViewUI::standardCancel()

Submit handler for cancel button

File

core/modules/views_ui/src/ViewUI.php, line 282
Contains \Drupal\views_ui\ViewUI.

Class

ViewUI
Stores UI related temporary settings.

Namespace

Drupal\views_ui

Code

public function standardCancel($form, FormStateInterface $form_state) {
  if (!empty($this->changed) && isset($this->form_cache)) {
    unset($this->form_cache);
    $this
      ->cacheSet();
  }
  $form_state
    ->setRedirectUrl($this
    ->urlInfo('edit-form'));
}