You are here

public function ViewFormBase::buildForm in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/views_ui/src/ViewFormBase.php \Drupal\views_ui\ViewFormBase::buildForm()

Form constructor.

Parameters

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

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The form structure.

Overrides EntityForm::buildForm

File

core/modules/views_ui/src/ViewFormBase.php, line 41
Contains \Drupal\views_ui\ViewFormBase.

Class

ViewFormBase
Base form for Views forms.

Namespace

Drupal\views_ui

Code

public function buildForm(array $form, FormStateInterface $form_state, $display_id = NULL) {
  if (isset($display_id) && $form_state
    ->has('display_id') && $display_id !== $form_state
    ->get('display_id')) {
    throw new \InvalidArgumentException('Mismatch between $form_state->get(\'display_id\') and $display_id.');
  }
  $this->displayID = $form_state
    ->has('display_id') ? $form_state
    ->get('display_id') : $display_id;
  return parent::buildForm($form, $form_state);
}