public function FormTestResponseForm::buildForm in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/form_test/src/Form/FormTestResponseForm.php \Drupal\form_test\Form\FormTestResponseForm::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
File
- core/
modules/ system/ tests/ modules/ form_test/ src/ Form/ FormTestResponseForm.php, line 29 - Contains \Drupal\form_test\Form\FormTestResponseForm.
Class
- FormTestResponseForm
- Form constructor for testing #type 'url' elements.
Namespace
Drupal\form_test\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['content'] = array(
'#type' => 'textfield',
'#title' => 'Content',
);
$form['status'] = array(
'#type' => 'textfield',
'#title' => 'Status',
'#default_value' => 200,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Submit',
);
return $form;
}