class OffCanvasTestHooks
Hook implementations for off_canvas_test.
Hierarchy
- class \Drupal\off_canvas_test\Hook\OffCanvasTestHooks
Expanded class hierarchy of OffCanvasTestHooks
File
-
core/
modules/ system/ tests/ modules/ off_canvas_test/ src/ Hook/ OffCanvasTestHooks.php, line 12
Namespace
Drupal\off_canvas_test\HookView source
class OffCanvasTestHooks {
/**
* Implements hook_page_attachments().
*/
public function pageAttachments(array &$attachments) : void {
// This library wraps around the Drupal.offCanvas.resetSize() method and
// adds a special data-resize-done attribute to help functional JavaScript
// tests use the off-canvas area when it is fully loaded and ready to be
// interacted with. @see
// \Drupal\Tests\system\Traits\OffCanvasTestTrait::waitForOffCanvasArea()
$attachments['#attached']['library'][] = 'off_canvas_test/resize_helper';
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
OffCanvasTestHooks::pageAttachments | public | function | Implements hook_page_attachments(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.