function FormInterface::buildForm

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

202 methods override FormInterface::buildForm()
ActionAdminManageForm::buildForm in core/modules/action/src/Form/ActionAdminManageForm.php
Form constructor.
ActionsTest::buildForm in core/tests/Drupal/KernelTests/Core/Render/Element/ActionsTest.php
AddBlockForm::buildForm in core/modules/layout_builder/src/Form/AddBlockForm.php
Builds the form for the block.
AddFormBase::buildForm in core/modules/media_library/src/Form/AddFormBase.php
AddHandler::buildForm in core/modules/views_ui/src/Form/Ajax/AddHandler.php

... 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.