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