You are here

function hook_event_dispatcher_user_logout in Hook Event Dispatcher 8

Implements hook_user_logout().

1 call to hook_event_dispatcher_user_logout()
UserEventTest::testUserLogoutEvent in tests/src/Unit/User/UserEventTest.php
User logout event test.

File

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

Code

function hook_event_dispatcher_user_logout(AccountInterface $account) {

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