function CssDisableTransitionsTestHooks::pageAttachments

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/css_disable_transitions_test/src/Hook/CssDisableTransitionsTestHooks.php \Drupal\css_disable_transitions_test\Hook\CssDisableTransitionsTestHooks::pageAttachments()

Implements hook_page_attachments().

Attributes

#[Hook('page_attachments')]

File

core/modules/system/tests/modules/css_disable_transitions_test/src/Hook/CssDisableTransitionsTestHooks.php, line 17

Class

CssDisableTransitionsTestHooks
Hook implementations for css_disable_transitions_test.

Namespace

Drupal\css_disable_transitions_test\Hook

Code

public function pageAttachments(array &$attachments) : void {
  // Unconditionally attach an asset to the page.
  $attachments['#attached']['library'][] = 'css_disable_transitions_test/testing.css_disable_transitions_test';
}

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