PageAttachmentsEvent.php in Hook Event Dispatcher 8.2
Same filename and directory in other branches
Namespace
Drupal\core_event_dispatcher\Event\ThemeFile
modules/core_event_dispatcher/src/Event/Theme/PageAttachmentsEvent.phpView source
<?php
namespace Drupal\core_event_dispatcher\Event\Theme;
use Drupal\hook_event_dispatcher\Event\EventInterface;
use Drupal\hook_event_dispatcher\HookEventDispatcherInterface;
use Symfony\Component\EventDispatcher\Event;
/**
* Class PageAttachmentsEvent.
*/
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;
}
}
Classes
Name | Description |
---|---|
PageAttachmentsEvent | Class PageAttachmentsEvent. |