public function HookEventDispatcherManager::register in Hook Event Dispatcher 8
Same name and namespace in other branches
- 8.2 src/Manager/HookEventDispatcherManager.php \Drupal\hook_event_dispatcher\Manager\HookEventDispatcherManager::register()
- 3.x 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 36
Class
- HookEventDispatcherManager
- Class HookEventDispatcherManager.
Namespace
Drupal\hook_event_dispatcher\ManagerCode
public function register(EventInterface $event) {
return $this->eventDispatcher
->dispatch($event
->getDispatcherType(), $event);
}