public static function JsWebAssertTestForm::addId in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php \Drupal\js_webassert_test\Form\JsWebAssertTestForm::addId()
Ajax callback for the "Add ID" button.
File
- core/
modules/ system/ tests/ modules/ js_webassert_test/ src/ Form/ JsWebAssertTestForm.php, line 174
Class
- JsWebAssertTestForm
- Test form for JSWebAssert JavaScriptTestBase.
Namespace
Drupal\js_webassert_test\FormCode
public static function addId(array $form, FormStateInterface $form_state) {
$form['added_id'] = [
'#id' => 'js_webassert_test_field_id',
'#type' => 'submit',
'#value' => 'Added ID',
'#button_type' => 'primary',
];
return $form;
}