class PageAttachmentsEvent in Hook Event Dispatcher 8
Class PageAttachmentsEvent.
Hierarchy
- class \Drupal\hook_event_dispatcher\Event\Page\PageAttachmentsEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of PageAttachmentsEvent
2 files declare their use of PageAttachmentsEvent
- hook_event_dispatcher.module in ./
hook_event_dispatcher.module - Hook event dispatcher module.
- PageAttachmentsEventTest.php in tests/
src/ Unit/ Page/ PageAttachmentsEventTest.php
File
- src/
Event/ Page/ PageAttachmentsEvent.php, line 12
Namespace
Drupal\hook_event_dispatcher\Event\PageView 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() {
return $this->attachments;
}
/**
* Set the attachments.
*
* @param array $attachments
* The attachments array.
*/
public function setAttachments(array $attachments) {
$this->attachments = $attachments;
}
/**
* {@inheritdoc}
*/
public function getDispatcherType() {
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 | Set the attachments. | |
PageAttachmentsEvent:: |
public | function | PageAttachmentsEvent constructor. |