function AjaxTestController::exceptionLink
Same name in other branches
- 11.x core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php \Drupal\ajax_test\Controller\AjaxTestController::exceptionLink()
Provides an Ajax link for the exception.
Return value
array The Ajax link.
1 string reference to 'AjaxTestController::exceptionLink'
- ajax_test.routing.yml in core/
modules/ system/ tests/ modules/ ajax_test/ ajax_test.routing.yml - core/modules/system/tests/modules/ajax_test/ajax_test.routing.yml
File
-
core/
modules/ system/ tests/ modules/ ajax_test/ src/ Controller/ AjaxTestController.php, line 407
Class
- AjaxTestController
- Provides content for dialog tests.
Namespace
Drupal\ajax_test\ControllerCode
public function exceptionLink() {
return [
'#type' => 'link',
'#url' => Url::fromRoute('ajax_test.throw_exception'),
'#title' => 'Ajax Exception',
'#attributes' => [
'class' => [
'use-ajax',
],
],
'#attached' => [
'library' => [
'core/drupal.ajax',
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.