function JsTestingAjaxRequestTestHooks::pageAttachments
Same name and namespace in other branches
- 11.x core/modules/system/tests/modules/js_testing_ajax_request_test/src/Hook/JsTestingAjaxRequestTestHooks.php \Drupal\js_testing_ajax_request_test\Hook\JsTestingAjaxRequestTestHooks::pageAttachments()
Implements hook_page_attachments().
Attributes
#[Hook('page_attachments')]
File
-
core/
modules/ system/ tests/ modules/ js_testing_ajax_request_test/ src/ Hook/ JsTestingAjaxRequestTestHooks.php, line 17
Class
- JsTestingAjaxRequestTestHooks
- Hook implementations for js_testing_ajax_request_test.
Namespace
Drupal\js_testing_ajax_request_test\HookCode
public function pageAttachments(array &$attachments) : void {
// Unconditionally attach an asset to the page.
$attachments['#attached']['library'][] = 'js_testing_ajax_request_test/track_ajax_requests';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.