You are here

function core_event_dispatcher_entity_insert in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 3.x modules/core_event_dispatcher/core_event_dispatcher.module \core_event_dispatcher_entity_insert()

Implements hook_entity_insert().

1 call to core_event_dispatcher_entity_insert()
EntityEventTest::testEntityInsertEvent in modules/core_event_dispatcher/tests/src/Unit/Entity/EntityEventTest.php
Test EntityInsertEvent.

File

modules/core_event_dispatcher/core_event_dispatcher.module, line 242
Core event dispatcher submodule.

Code

function core_event_dispatcher_entity_insert(EntityInterface $entity) {

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