final class ViewsDataAlterEvent in Hook Event Dispatcher 8
Class ViewsDataAlterEvent.
Hierarchy
- class \Drupal\hook_event_dispatcher\Event\Views\ViewsDataAlterEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of ViewsDataAlterEvent
2 files declare their use of ViewsDataAlterEvent
- hook_event_dispatcher.module in ./
hook_event_dispatcher.module - Hook event dispatcher module.
- ViewDataEventTest.php in tests/
src/ Unit/ Views/ ViewDataEventTest.php
File
- src/
Event/ Views/ ViewsDataAlterEvent.php, line 12
Namespace
Drupal\hook_event_dispatcher\Event\ViewsView source
final class ViewsDataAlterEvent extends Event implements EventInterface {
/**
* Data.
*
* @var array
*/
private $data;
/**
* ViewsDataAlterEvent constructor.
*
* @param array $data
* Data.
*/
public function __construct(array &$data) {
$this->data =& $data;
}
/**
* Get data by refence.
*
* @return array
* Data.
*/
public function &getData() {
return $this->data;
}
/**
* Set data.
*
* @param array $data
* Data.
*/
public function setData(array $data) {
$this->data = $data;
}
/**
* Get the dispatcher type.
*
* @return string
* The dispatcher type.
*/
public function getDispatcherType() {
return HookEventDispatcherInterface::VIEWS_DATA_ALTER;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ViewsDataAlterEvent:: |
private | property | Data. | |
ViewsDataAlterEvent:: |
public | function | Get data by refence. | |
ViewsDataAlterEvent:: |
public | function |
Get the dispatcher type. Overrides EventInterface:: |
|
ViewsDataAlterEvent:: |
public | function | Set data. | |
ViewsDataAlterEvent:: |
public | function | ViewsDataAlterEvent constructor. |