You are here

public static function JsAjaxTestForm::addButton in Drupal 8

Same name and namespace in other branches
  1. 9 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\Form

Code

public static function addButton(array $form, FormStateInterface $form_state) {
  return (new AjaxResponse())
    ->addCommand(new JsAjaxTestCommand());
}