function ViewPreviewForm::submitPreview

Same name in other branches
  1. 9 core/modules/views_ui/src/ViewPreviewForm.php \Drupal\views_ui\ViewPreviewForm::submitPreview()
  2. 10 core/modules/views_ui/src/ViewPreviewForm.php \Drupal\views_ui\ViewPreviewForm::submitPreview()
  3. 11.x core/modules/views_ui/src/ViewPreviewForm.php \Drupal\views_ui\ViewPreviewForm::submitPreview()

Form submission handler for the Preview button.

File

core/modules/views_ui/src/ViewPreviewForm.php, line 103

Class

ViewPreviewForm
Form controller for the Views preview form.

Namespace

Drupal\views_ui

Code

public function submitPreview($form, FormStateInterface $form_state) {
    $form_state->set('show_preview', TRUE);
    $form_state->setRebuild();
}

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