function JsWebAssertTestForm::addLink
Ajax callback for the "Add link" button.
File
-
core/
modules/ system/ tests/ modules/ jswebassert_test/ src/ Form/ JsWebAssertTestForm.php, line 152
Class
- JsWebAssertTestForm
- Test form for JSWebAssert WebDriverTestBase.
Namespace
Drupal\jswebassert_test\FormCode
public static function addLink(array $form, FormStateInterface $form_state) {
$form['added_link'] = [
'#title' => 'Added link',
'#type' => 'link',
'#url' => Url::fromRoute('jswebassert_test.jswebassert_test_form'),
];
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.