class LibraryInfoAlterEvent in Hook Event Dispatcher 8
Class LibraryInfoAlterEvent.
Hierarchy
- class \Drupal\hook_event_dispatcher\Event\Theme\LibraryInfoAlterEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of LibraryInfoAlterEvent
2 files declare their use of LibraryInfoAlterEvent
- hook_event_dispatcher.module in ./
hook_event_dispatcher.module - Hook event dispatcher module.
- LibraryInfoAlterEventTest.php in tests/
src/ Unit/ Theme/ LibraryInfoAlterEventTest.php
File
- src/
Event/ Theme/ LibraryInfoAlterEvent.php, line 12
Namespace
Drupal\hook_event_dispatcher\Event\ThemeView source
class LibraryInfoAlterEvent extends Event implements EventInterface {
/**
* Libraries.
*
* @var array
*/
private $libraries;
/**
* Extension machine name.
*
* @var string
*/
private $extension;
/**
* LibraryInfoAlterEvent constructor.
*
* @param array $libraries
* An associative array of libraries registered by $extension.
* Keyed by internal library.
* @param string $extension
* Can either be 'core' or the machine name of the extension
* that registered the libraries.
*/
public function __construct(array &$libraries, $extension) {
$this->libraries =& $libraries;
$this->extension = $extension;
}
/**
* Get libraries info.
*
* @return array
* Libraries info.
*/
public function &getLibraries() {
return $this->libraries;
}
/**
* Get the extension.
*
* @return string
* The extension.
*/
public function getExtension() {
return $this->extension;
}
/**
* {@inheritdoc}
*/
public function getDispatcherType() {
return HookEventDispatcherInterface::LIBRARY_INFO_ALTER;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LibraryInfoAlterEvent:: |
private | property | Extension machine name. | |
LibraryInfoAlterEvent:: |
private | property | Libraries. | |
LibraryInfoAlterEvent:: |
public | function |
Get the dispatcher type. Overrides EventInterface:: |
|
LibraryInfoAlterEvent:: |
public | function | Get the extension. | |
LibraryInfoAlterEvent:: |
public | function | Get libraries info. | |
LibraryInfoAlterEvent:: |
public | function | LibraryInfoAlterEvent constructor. |