public function HookEventDispatcherManager::register in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 src/Manager/HookEventDispatcherManager.php \Drupal\hook_event_dispatcher\Manager\HookEventDispatcherManager::register()
- 8 src/Manager/HookEventDispatcherManager.php \Drupal\hook_event_dispatcher\Manager\HookEventDispatcherManager::register()
Registers an event dispatcher for given entity.
Parameters
\Drupal\hook_event_dispatcher\Event\EventInterface $event: The event.
Return value
\Symfony\Component\EventDispatcher\Event The event.
Overrides HookEventDispatcherManagerInterface::register
File
- src/
Manager/ HookEventDispatcherManager.php, line 37
Class
- HookEventDispatcherManager
- Class HookEventDispatcherManager.
Namespace
Drupal\hook_event_dispatcher\ManagerCode
public function register(EventInterface $event) : Event {
return $this->eventDispatcher
->dispatch($event
->getDispatcherType(), $event);
}