You are here

constant HookEventDispatcherInterface::PAGE_ATTACHMENTS in Hook Event Dispatcher 8

Same name and namespace in other branches
  1. 8.2 src/HookEventDispatcherInterface.php \Drupal\hook_event_dispatcher\HookEventDispatcherInterface::PAGE_ATTACHMENTS
  2. 3.x src/HookEventDispatcherInterface.php \Drupal\hook_event_dispatcher\HookEventDispatcherInterface::PAGE_ATTACHMENTS

Add attachments (typically assets) to a page before it is rendered.

Attachments should be added to individual element render arrays whenever possible, as per Drupal best practices, so only use this when that isn't practical or you need to target the page itself.

See also

hook_event_dispatcher_page_attachments()

hook_page_attachments()

File

src/HookEventDispatcherInterface.php, line 718

Class

HookEventDispatcherInterface
Interface HookEventDispatcherInterface.

Namespace

Drupal\hook_event_dispatcher

Code

const PAGE_ATTACHMENTS = 'hook_event_dispatcher.page.attachments';