public function ViewFormBase::buildForm in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views_ui/src/ViewFormBase.php \Drupal\views_ui\ViewFormBase::buildForm()
- 9 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 36
Class
- ViewFormBase
- Base form for Views forms.
Namespace
Drupal\views_uiCode
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);
}