You are here

public function ConfigForm::__construct in Restrict IP 8

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

* Creates the Restrict IP ConfigForm object * *

Parameters

\Drupal\Core\Session\AccountProxyInterface $currentUser: * The current user * @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler * The Module Handler service * @param \Drupal\restrict_ip\Service\RestrictIpServiceInterface $restrictIpService * The Restrict IP service object

Overrides ConfigFormBase::__construct

File

src/Form/ConfigForm.php, line 68

Class

ConfigForm

Namespace

Drupal\restrict_ip\Form

Code

public function __construct(AccountProxyInterface $currentUser, ModuleHandlerInterface $moduleHandler, RestrictIpServiceInterface $restrictIpService) {
  $this->currentUser = $currentUser;
  $this->moduleHandler = $moduleHandler;
  $this->restrictIpService = $restrictIpService;
  $this->whitelistedIpAddresses = $this->restrictIpService
    ->getWhitelistedIpAddresses();
  $this->whitelistedPagePaths = $this->restrictIpService
    ->getWhitelistedPagePaths();
  $this->blacklistedPagePaths = $this->restrictIpService
    ->getBlacklistedPagePaths();
}