function JsWebAssertTestForm::addButton
Same name in this branch
- 11.x core/modules/system/tests/modules/jswebassert_test/src/Form/JsWebAssertTestForm.php \Drupal\jswebassert_test\Form\JsWebAssertTestForm::addButton()
Same name in other branches
- 9 core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php \Drupal\js_webassert_test\Form\JsWebAssertTestForm::addButton()
- 8.9.x core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php \Drupal\js_webassert_test\Form\JsWebAssertTestForm::addButton()
- 10 core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php \Drupal\js_webassert_test\Form\JsWebAssertTestForm::addButton()
Ajax callback for the "Add button" button.
File
-
core/
modules/ system/ tests/ modules/ js_webassert_test/ src/ Form/ JsWebAssertTestForm.php, line 138
Class
- JsWebAssertTestForm
- Test form for JSWebAssert WebDriverTestBase.
Namespace
Drupal\js_webassert_test\FormCode
public static function addButton(array $form, FormStateInterface $form_state) {
$form['added_button'] = [
'#type' => 'submit',
'#value' => 'Added button',
'#button_type' => 'primary',
];
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.