final class JsAlterEvent in Hook Event Dispatcher 8
Class JsAlterEvent.
Hierarchy
- class \Drupal\hook_event_dispatcher\Event\Theme\JsAlterEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of JsAlterEvent
2 files declare their use of JsAlterEvent
- hook_event_dispatcher.module in ./
hook_event_dispatcher.module - Hook event dispatcher module.
- JsAlterEventTest.php in tests/
src/ Unit/ Theme/ JsAlterEventTest.php
File
- src/
Event/ Theme/ JsAlterEvent.php, line 13
Namespace
Drupal\hook_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() {
return $this->javascript;
}
/**
* Set the javascript.
*
* @param array $javascript
* Javascript.
*/
public function setJavascript(array $javascript) {
$this->javascript = $javascript;
}
/**
* Get the attached assets.
*
* @return \Drupal\Core\Asset\AttachedAssetsInterface
* AttachedAssets.
*/
public function getAttachedAssets() {
return $this->attachedAssets;
}
/**
* Get the dispatcher type.
*
* @return string
* The dispatcher type.
*/
public function getDispatcherType() {
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 | Set the javascript. | |
JsAlterEvent:: |
public | function | JsAlterEvent constructor. |