You are here

function hook_event_dispatcher_user_cancel in Hook Event Dispatcher 8

Implements hook_user_cancel().

1 call to hook_event_dispatcher_user_cancel()
UserEventTest::testUserCancelEvent in tests/src/Unit/User/UserEventTest.php
User cancel event test.

File

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

Code

function hook_event_dispatcher_user_cancel(array $edit, AccountInterface $account, $method) {

  /** @var \Drupal\hook_event_dispatcher\Manager\HookEventDispatcherManagerInterface $manager */
  $manager = \Drupal::service('hook_event_dispatcher.manager');
  $event = new UserCancelEvent($edit, $account, $method);
  $manager
    ->register($event);
}