public function ViewEditFormController::cancel

Form submission handler for the 'cancel' action.

Parameters

array $form: An associative array containing the structure of the form.

array $form_state: A reference to a keyed array containing the current state of the form.

File

drupal/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php, line 314
Contains Drupal\views_ui\ViewEditFormController.

Class

ViewEditFormController
Form controller for the Views edit form.

Namespace

Drupal\views_ui

Code

public function cancel(array $form, array &$form_state) {

  // Remove this view from cache so edits will be lost.
  $view = $this->entity;
  $this->tempStore
    ->delete($view
    ->id());
  $form_state['redirect'] = 'admin/structure/views';
}