class LibraryInfoAlterEvent in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/core_event_dispatcher/src/Event/Theme/LibraryInfoAlterEvent.php \Drupal\core_event_dispatcher\Event\Theme\LibraryInfoAlterEvent
Class LibraryInfoAlterEvent.
Hierarchy
- class \Drupal\core_event_dispatcher\Event\Theme\LibraryInfoAlterEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of LibraryInfoAlterEvent
2 files declare their use of LibraryInfoAlterEvent
- core_event_dispatcher.module in modules/
core_event_dispatcher/ core_event_dispatcher.module - Core event dispatcher submodule.
- LibraryInfoAlterEventTest.php in modules/
core_event_dispatcher/ tests/ src/ Unit/ Theme/ LibraryInfoAlterEventTest.php
File
- modules/
core_event_dispatcher/ src/ Event/ Theme/ LibraryInfoAlterEvent.php, line 12
Namespace
Drupal\core_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, string $extension) {
$this->libraries =& $libraries;
$this->extension = $extension;
}
/**
* Get libraries info.
*
* @return array
* Libraries info.
*/
public function &getLibraries() : array {
return $this->libraries;
}
/**
* Get the extension.
*
* @return string
* The extension.
*/
public function getExtension() : string {
return $this->extension;
}
/**
* {@inheritdoc}
*/
public function getDispatcherType() : string {
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. |