function JsAjaxTestForm::addButton

Same name 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());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.