public function Test::buildForm in farmOS 2.x
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 QuickFormBase::buildForm
File
- modules/
core/ quick/ tests/ modules/ farm_quick_test/ src/ Plugin/ QuickForm/ Test.php, line 35
Class
- Test
- Test quick form.
Namespace
Drupal\farm_quick_test\Plugin\QuickFormCode
public function buildForm(array $form, FormStateInterface $form_state, string $id = NULL) {
// Test field.
$form['test'] = [
'#type' => 'number',
'#title' => $this
->t('Test field'),
];
return $form;
}