class ToolbarAlterEvent in Hook Event Dispatcher 8
Class ToolbarAlterEvent.
Hierarchy
- class \Drupal\hook_event_dispatcher\Event\Toolbar\ToolbarAlterEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of ToolbarAlterEvent
2 files declare their use of ToolbarAlterEvent
- hook_event_dispatcher.module in ./
hook_event_dispatcher.module - Hook event dispatcher module.
- ToolbarAlterEventTest.php in tests/
src/ Unit/ Toolbar/ ToolbarAlterEventTest.php
File
- src/
Event/ Toolbar/ ToolbarAlterEvent.php, line 12
Namespace
Drupal\hook_event_dispatcher\Event\ToolbarView source
class ToolbarAlterEvent extends Event implements EventInterface {
/**
* The toolbar items.
*
* @var array
*/
private $items;
/**
* ToolbarAlterEvent constructor.
*
* @param array $items
* The toolbar items.
*/
public function __construct(array &$items) {
$this->items =& $items;
}
/**
* Get the items by reference.
*
* @return array
* The items.
*/
public function &getItems() {
return $this->items;
}
/**
* Set the items.
*
* @param array $items
* The items.
*/
public function setItems(array $items) {
$this->items = $items;
}
/**
* {@inheritdoc}
*/
public function getDispatcherType() {
return HookEventDispatcherInterface::TOOLBAR_ALTER;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ToolbarAlterEvent:: |
private | property | The toolbar items. | |
ToolbarAlterEvent:: |
public | function |
Get the dispatcher type. Overrides EventInterface:: |
|
ToolbarAlterEvent:: |
public | function | Get the items by reference. | |
ToolbarAlterEvent:: |
public | function | Set the items. | |
ToolbarAlterEvent:: |
public | function | ToolbarAlterEvent constructor. |