function ViewUI::standardCancel

Same name in other branches
  1. 8.9.x core/modules/views_ui/src/ViewUI.php \Drupal\views_ui\ViewUI::standardCancel()
  2. 10 core/modules/views_ui/src/ViewUI.php \Drupal\views_ui\ViewUI::standardCancel()
  3. 11.x 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 270

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->toUrl('edit-form'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.