ViewFormBase::buildForm

public ViewFormBase::buildForm(array $form, FormStateInterface $form_state, $display_id = NULL)

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 36

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);
}
doc_Drupal
2016-10-29 09:54:34
Comments
Leave a Comment

Please login to continue.