off_canvas_test.module

Same filename and directory in other branches
  1. 10 core/modules/system/tests/modules/off_canvas_test/off_canvas_test.module
  2. 11.x core/modules/system/tests/modules/off_canvas_test/off_canvas_test.module

Contains hook implementations for testing the off-canvas area.

File

core/modules/system/tests/modules/off_canvas_test/off_canvas_test.module

View source
<?php


/**
 * @file
 * Contains hook implementations for testing the off-canvas area.
 */


/**
 * Implements hook_page_attachments().
 */
function off_canvas_test_page_attachments(array &$attachments) {
  // 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';
}

Functions

Title Deprecated Summary
off_canvas_test_page_attachments Implements hook_page_attachments().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.