public static function JsAjaxTestForm::addButton in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/js_ajax_test/src/Form/JsAjaxTestForm.php \Drupal\js_ajax_test\Form\JsAjaxTestForm::addButton()
Ajax callback for the "Add button" button.
File
- core/
modules/ system/ tests/ modules/ js_ajax_test/ src/ Form/ JsAjaxTestForm.php, line 52
Class
- JsAjaxTestForm
- Test form for js_ajax_test.
Namespace
Drupal\js_ajax_test\FormCode
public static function addButton(array $form, FormStateInterface $form_state) {
return (new AjaxResponse())
->addCommand(new JsAjaxTestCommand());
}