You are here

public function IpGeoLocAPI::__construct in IP Geolocation Views & Maps 8

Constructs a new IpGeoLocGlobal object. Adds dependency injection.

File

src/Services/IpGeoLocAPI.php, line 35

Class

IpGeoLocAPI
Class IpGeoAPI to interact with other modules.

Namespace

Drupal\ip_geoloc\Services

Code

public function __construct(LoggerChannelFactoryInterface $logger, IpGeoLocSession $ipGeolocSession, TranslationInterface $stringTranslation, MessengerInterface $messenger, ConfigFactoryInterface $config_factory) {
  $this->logger = $logger;
  $this->ipGeolocSession = $ipGeolocSession;
  $this->stringTranslation = $stringTranslation;
  $this->messenger = $messenger;
  $this->config = $config_factory
    ->get('ip_geoloc.settings');
}