function UserRequestSubscriber::getSubscribedEvents

Same name in other branches
  1. 9 core/modules/user/src/EventSubscriber/UserRequestSubscriber.php \Drupal\user\EventSubscriber\UserRequestSubscriber::getSubscribedEvents()
  2. 8.9.x core/modules/user/src/EventSubscriber/UserRequestSubscriber.php \Drupal\user\EventSubscriber\UserRequestSubscriber::getSubscribedEvents()
  3. 11.x core/modules/user/src/EventSubscriber/UserRequestSubscriber.php \Drupal\user\EventSubscriber\UserRequestSubscriber::getSubscribedEvents()

File

core/modules/user/src/EventSubscriber/UserRequestSubscriber.php, line 69

Class

UserRequestSubscriber
Updates the current user's last access time.

Namespace

Drupal\user\EventSubscriber

Code

public static function getSubscribedEvents() : array {
    // Should go before other subscribers start to write their caches.
    $events[KernelEvents::TERMINATE][] = [
        'onKernelTerminate',
        300,
    ];
    return $events;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.