class ToolbarAlterEvent in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x modules/toolbar_event_dispatcher/src/Event/Toolbar/ToolbarAlterEvent.php \Drupal\toolbar_event_dispatcher\Event\Toolbar\ToolbarAlterEvent
Class ToolbarAlterEvent.
Hierarchy
- class \Drupal\toolbar_event_dispatcher\Event\Toolbar\ToolbarAlterEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of ToolbarAlterEvent
2 files declare their use of ToolbarAlterEvent
- ToolbarAlterEventTest.php in modules/
toolbar_event_dispatcher/ tests/ src/ Unit/ Toolbar/ ToolbarAlterEventTest.php - toolbar_event_dispatcher.module in modules/
toolbar_event_dispatcher/ toolbar_event_dispatcher.module - Toolbar event dispatcher submodule.
File
- modules/
toolbar_event_dispatcher/ src/ Event/ Toolbar/ ToolbarAlterEvent.php, line 12
Namespace
Drupal\toolbar_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() : array {
return $this->items;
}
/**
* {@inheritdoc}
*/
public function getDispatcherType() : string {
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 | ToolbarAlterEvent constructor. |