You are here

function hook_event_dispatcher_entity_load in Hook Event Dispatcher 8

Implements hook_entity_load().

1 call to hook_event_dispatcher_entity_load()
EntityEventTest::testEntityLoadEvent in tests/src/Unit/Entity/EntityEventTest.php
Test EntityLoadEvent.

File

./hook_event_dispatcher.module, line 185
Hook event dispatcher module.

Code

function hook_event_dispatcher_entity_load(array $entities, $entityTypeId) {

  /** @var \Drupal\hook_event_dispatcher\Manager\HookEventDispatcherManagerInterface $manager */
  $manager = \Drupal::service('hook_event_dispatcher.manager');
  $manager
    ->register(new EntityLoadEvent($entities, $entityTypeId));
}