class PageAttachmentsEvent in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x modules/core_event_dispatcher/src/Event/Theme/PageAttachmentsEvent.php \Drupal\core_event_dispatcher\Event\Theme\PageAttachmentsEvent
Class PageAttachmentsEvent.
Hierarchy
- class \Drupal\core_event_dispatcher\Event\Theme\PageAttachmentsEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of PageAttachmentsEvent
2 files declare their use of PageAttachmentsEvent
- core_event_dispatcher.module in modules/
core_event_dispatcher/ core_event_dispatcher.module - Core event dispatcher submodule.
- PageEventTest.php in modules/
core_event_dispatcher/ tests/ src/ Unit/ Theme/ PageEventTest.php
File
- modules/
core_event_dispatcher/ src/ Event/ Theme/ PageAttachmentsEvent.php, line 12
Namespace
Drupal\core_event_dispatcher\Event\ThemeView source
class PageAttachmentsEvent extends Event implements EventInterface {
/**
* The attachments array.
*
* @var array
*/
private $attachments;
/**
* PageAttachmentsEvent constructor.
*
* @param array $attachments
* The attachments array.
*/
public function __construct(array &$attachments) {
$this->attachments =& $attachments;
}
/**
* Get the attachments array.
*
* @return array
* The attachments array.
*/
public function &getAttachments() : array {
return $this->attachments;
}
/**
* {@inheritdoc}
*/
public function getDispatcherType() : string {
return HookEventDispatcherInterface::PAGE_ATTACHMENTS;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PageAttachmentsEvent:: |
private | property | The attachments array. | |
PageAttachmentsEvent:: |
public | function | Get the attachments array. | |
PageAttachmentsEvent:: |
public | function |
Get the dispatcher type. Overrides EventInterface:: |
|
PageAttachmentsEvent:: |
public | function | PageAttachmentsEvent constructor. |