function FormInterface::buildForm

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Form/FormInterface.php \Drupal\Core\Form\FormInterface::buildForm()
  2. 10 core/lib/Drupal/Core/Form/FormInterface.php \Drupal\Core\Form\FormInterface::buildForm()
  3. 8.9.x core/lib/Drupal/Core/Form/FormInterface.php \Drupal\Core\Form\FormInterface::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.

18 methods override FormInterface::buildForm()
AjaxFormsTestValidationForm::buildForm in core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestValidationForm.php
Form constructor.
ConfigureSectionForm::buildForm in core/modules/layout_builder/src/Form/ConfigureSectionForm.php
Form constructor.
DatelistElementFormTest::buildForm in core/tests/Drupal/KernelTests/Core/Datetime/DatelistElementFormTest.php
Form constructor.
DraggableListBuilder::buildForm in core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php
Form constructor.
EntityAutocompleteElementFormTest::buildForm in core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php
Form constructor.

... See full list

File

core/lib/Drupal/Core/Form/FormInterface.php, line 35

Class

FormInterface
Provides an interface for a Form.

Namespace

Drupal\Core\Form

Code

public function buildForm(array $form, FormStateInterface $form_state);

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