public function RestrictIpEventSubscriber::__construct in Restrict IP 8
Same name and namespace in other branches
- 8.2 src/EventSubscriber/RestrictIpEventSubscriber.php \Drupal\restrict_ip\EventSubscriber\RestrictIpEventSubscriber::__construct()
- 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
Namespace
Drupal\restrict_ip\EventSubscriberCode
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');
}