JsAlterEvent.php in Hook Event Dispatcher 8.2
File
modules/core_event_dispatcher/src/Event/Theme/JsAlterEvent.php
View source
<?php
namespace Drupal\core_event_dispatcher\Event\Theme;
use Drupal\Core\Asset\AttachedAssetsInterface;
use Drupal\hook_event_dispatcher\Event\EventInterface;
use Drupal\hook_event_dispatcher\HookEventDispatcherInterface;
use Symfony\Component\EventDispatcher\Event;
final class JsAlterEvent extends Event implements EventInterface {
private $javascript;
private $attachedAssets;
public function __construct(array &$javascript, AttachedAssetsInterface $attachedAssets) {
$this->javascript =& $javascript;
$this->attachedAssets = $attachedAssets;
}
public function &getJavascript() : array {
return $this->javascript;
}
public function getAttachedAssets() : AttachedAssetsInterface {
return $this->attachedAssets;
}
public function getDispatcherType() : string {
return HookEventDispatcherInterface::JS_ALTER;
}
}