You are here

public function GeoLocatorBase::__construct in GeoIP API 8.2

Constructs a PluginBase object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.

\Psr\Log\LoggerInterface $logger: The log channel.

Overrides PluginBase::__construct

File

src/Plugin/GeoLocator/GeoLocatorBase.php, line 44

Class

GeoLocatorBase
Class GeoLocatorBase.

Namespace

Drupal\geoip\Plugin\GeoLocator

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, LoggerInterface $logger) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->geoIpConfig = $config_factory
    ->get('geoip.geolocation');
  $this->logger = $logger;
}