public function FormDefaultHandlersTest::buildForm in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Form/FormDefaultHandlersTest.php \Drupal\system\Tests\Form\FormDefaultHandlersTest::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/ src/ Tests/ Form/ FormDefaultHandlersTest.php, line 47 - Contains \Drupal\system\Tests\Form\FormDefaultHandlersTest.
Class
- FormDefaultHandlersTest
- Tests automatically added form handlers.
Namespace
Drupal\system\Tests\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['#validate'][] = '::customValidateForm';
$form['#submit'][] = '::customSubmitForm';
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Save',
);
return $form;
}