LibraryInfoAlterEvent.php in Hook Event Dispatcher 8
Namespace
Drupal\hook_event_dispatcher\Event\ThemeFile
src/Event/Theme/LibraryInfoAlterEvent.phpView source
<?php
namespace Drupal\hook_event_dispatcher\Event\Theme;
use Drupal\hook_event_dispatcher\Event\EventInterface;
use Drupal\hook_event_dispatcher\HookEventDispatcherInterface;
use Symfony\Component\EventDispatcher\Event;
/**
* Class LibraryInfoAlterEvent.
*/
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;
}
}
Classes
Name | Description |
---|---|
LibraryInfoAlterEvent | Class LibraryInfoAlterEvent. |