function Display::getFormState

Same name and namespace in other branches
  1. 9 core/modules/views_ui/src/Form/Ajax/Display.php \Drupal\views_ui\Form\Ajax\Display::getFormState()
  2. 8.9.x core/modules/views_ui/src/Form/Ajax/Display.php \Drupal\views_ui\Form\Ajax\Display::getFormState()
  3. 10 core/modules/views_ui/src/Form/Ajax/Display.php \Drupal\views_ui\Form\Ajax\Display::getFormState()

@todo Remove this and switch all usage of $form_state->get('section') to $form_state->get('type').

Overrides ViewsFormBase::getFormState

File

core/modules/views_ui/src/Form/Ajax/Display.php, line 35

Class

Display
Provides a form for editing the Views display.

Namespace

Drupal\views_ui\Form\Ajax

Code

public function getFormState(ViewEntityInterface $view, $display_id, $js) {
    $form_state = parent::getFormState($view, $display_id, $js);
    $form_state->set('section', $this->type);
    return $form_state;
}

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