You are here

public function HookEventDispatcherManager::register in Hook Event Dispatcher 8

Same name and namespace in other branches
  1. 8.2 src/Manager/HookEventDispatcherManager.php \Drupal\hook_event_dispatcher\Manager\HookEventDispatcherManager::register()
  2. 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\Manager

Code

public function register(EventInterface $event) {
  return $this->eventDispatcher
    ->dispatch($event
    ->getDispatcherType(), $event);
}