You are here

public function GetLocationEvent::__construct in Smart IP 8.4

Same name and namespace in other branches
  1. 8.2 src/GetLocationEvent.php \Drupal\smart_ip\GetLocationEvent::__construct()
  2. 8.3 src/GetLocationEvent.php \Drupal\smart_ip\GetLocationEvent::__construct()

Constructs a Smart IP event.

Parameters

\Drupal\smart_ip\SmartIpLocationInterface $location: Smart IP's data location.

File

src/GetLocationEvent.php, line 38
Contains \Drupal\smart_ip\GetLocationEvent.

Class

GetLocationEvent
Provides Smart IP query location override event for event listeners.

Namespace

Drupal\smart_ip

Code

public function __construct(SmartIpLocationInterface $location) {
  $this
    ->setLocation($location);
  $this->dataSource = \Drupal::config('smart_ip.settings')
    ->get('data_source');
}