function JsWebAssertTestForm::addId

Same name in this branch
  1. 11.x core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php \Drupal\js_webassert_test\Form\JsWebAssertTestForm::addId()
Same name in other branches
  1. 9 core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php \Drupal\js_webassert_test\Form\JsWebAssertTestForm::addId()
  2. 8.9.x core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php \Drupal\js_webassert_test\Form\JsWebAssertTestForm::addId()
  3. 10 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/jswebassert_test/src/Form/JsWebAssertTestForm.php, line 176

Class

JsWebAssertTestForm
Test form for JSWebAssert WebDriverTestBase.

Namespace

Drupal\jswebassert_test\Form

Code

public static function addId(array $form, FormStateInterface $form_state) {
    $form['added_id'] = [
        '#id' => 'jswebassert_test_field_id',
        '#type' => 'submit',
        '#value' => 'Added ID',
        '#button_type' => 'primary',
    ];
    return $form;
}

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