You are here

public function RestrictIpEventSubscriber::__construct in Restrict IP 8

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

* Creates an instance of the RestrictIpEventSubscriber class * *

Parameters

\Drupal\restrict_ip\Service\RestrictIpService $restrictIpService: * The restrict IP service * @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory * The Config Factory service * @param \Drupal\Core\Logger\LoggerChannelFactoryInterface $loggerFactory * The Logger Factory service * @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler * The Module Handler service * @param \Drupal\Core\Routing\UrlGeneratorInterface $urlGenerator * The Url Generator service

File

src/EventSubscriber/RestrictIpEventSubscriber.php, line 67

Class

RestrictIpEventSubscriber

Namespace

Drupal\restrict_ip\EventSubscriber

Code

public function __construct(RestrictIpServiceInterface $restrictIpService, ConfigFactoryInterface $configFactory, LoggerChannelFactoryInterface $loggerFactory, ModuleHandlerInterface $moduleHandler, UrlGeneratorInterface $urlGenerator) {
  $this->restrictIpService = $restrictIpService;
  $this->loggerFactory = $loggerFactory;
  $this->moduleHandler = $moduleHandler;
  $this->urlGenerator = $urlGenerator;
  $this->config = $configFactory
    ->get('restrict_ip.settings');
}