You are here

public function TableDragTestForm::buildForm in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/tabledrag_test/src/Form/TableDragTestForm.php \Drupal\tabledrag_test\Form\TableDragTestForm::buildForm()
  2. 9 core/modules/system/tests/modules/tabledrag_test/src/Form/TableDragTestForm.php \Drupal\tabledrag_test\Form\TableDragTestForm::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 FormInterface::buildForm

1 method overrides TableDragTestForm::buildForm()
NestedTableDragTestForm::buildForm in core/modules/system/tests/modules/tabledrag_test/src/Form/NestedTableDragTestForm.php
Form constructor.

File

core/modules/system/tests/modules/tabledrag_test/src/Form/TableDragTestForm.php, line 172

Class

TableDragTestForm
Provides a form for draggable table testing.

Namespace

Drupal\tabledrag_test\Form

Code

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

  // Provide a default set of five rows.
  $form['table'] = $this
    ->buildTestTable();
  $form['actions'] = $this
    ->buildFormActions();
  return $form;
}