You are here

public constant HookEventDispatcherInterface::PAGE_ATTACHMENTS in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 src/HookEventDispatcherInterface.php \Drupal\hook_event_dispatcher\HookEventDispatcherInterface::PAGE_ATTACHMENTS
  2. 8 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

core_event_dispatcher_page_attachments()

hook_page_attachments()

File

src/HookEventDispatcherInterface.php, line 805

Class

HookEventDispatcherInterface
Interface HookEventDispatcherInterface.

Namespace

Drupal\hook_event_dispatcher

Code

public const PAGE_ATTACHMENTS = self::PREFIX . 'page.attachments';