function AjaxTestController::propertyLink
Same name and namespace in other branches
- main core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php \Drupal\ajax_test\Controller\AjaxTestController::propertyLink()
Provides an Ajax link to a URL that is also a JS object property.
Return value
array The Ajax link.
1 string reference to 'AjaxTestController::propertyLink'
- 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 547
Class
- AjaxTestController
- Provides content for dialog tests.
Namespace
Drupal\ajax_test\ControllerCode
public function propertyLink() : array {
return [
'#markup' => '<a class="use-ajax" href="constructor" data-ajax-http-method="GET">Ajax constructor</a>',
'#attached' => [
'library' => [
'core/drupal.ajax',
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.