You are here

public static function RestrictIpEventSubscriber::getSubscribedEvents in Restrict IP 8

Same name and namespace in other branches
  1. 8.2 src/EventSubscriber/RestrictIpEventSubscriber.php \Drupal\restrict_ip\EventSubscriber\RestrictIpEventSubscriber::getSubscribedEvents()
  2. 3.x src/EventSubscriber/RestrictIpEventSubscriber.php \Drupal\restrict_ip\EventSubscriber\RestrictIpEventSubscriber::getSubscribedEvents()

*

File

src/EventSubscriber/RestrictIpEventSubscriber.php, line 80

Class

RestrictIpEventSubscriber

Namespace

Drupal\restrict_ip\EventSubscriber

Code

public static function getSubscribedEvents() {

  // On page load, we need to check for whether the user should be blocked by IP
  $events[KernelEvents::REQUEST][] = [
    'checkIpRestricted',
  ];
  return $events;
}