public function Ip2CountrySettingsForm::__construct in IP-based Determination of a Visitor's Country 8
Constructs an Ip2CountryController.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects.
\Symfony\Component\HttpFoundation\RequestStack $requestStack: The request stack.
\Drupal\Core\Session\AccountInterface $currentUser: The current user.
\Drupal\user\UserDataInterface $userData: The current user's data.
\Drupal\Core\State\StateInterface $stateService: The state service.
\Drupal\Core\Datetime\DateFormatterInterface $dateFormatter: The date formatter service.
\Drupal\Core\Locale\CountryManagerInterface $countryManager: The country_manager service.
\Drupal\ip2country\Ip2CountryLookupInterface $ip2countryLookup: The ip2country.manager service.
Overrides ConfigFormBase::__construct
File
- src/
Form/ Ip2CountrySettingsForm.php, line 92
Class
- Ip2CountrySettingsForm
- Configure ip2country settings for this site.
Namespace
Drupal\ip2country\FormCode
public function __construct(ConfigFactoryInterface $config_factory, RequestStack $requestStack, AccountInterface $currentUser, UserDataInterface $userData, StateInterface $stateService, DateFormatterInterface $dateFormatter, CountryManagerInterface $countryManager, Ip2CountryLookupInterface $ip2countryLookup) {
parent::__construct($config_factory);
$this->currentRequest = $requestStack
->getCurrentRequest();
$this->currentUser = $currentUser;
$this->userData = $userData;
$this->stateService = $stateService;
$this->dateFormatter = $dateFormatter;
$this->countryManager = $countryManager;
$this->ip2countryLookup = $ip2countryLookup;
}