class GetLocationEvent in Smart IP 8.3
Same name and namespace in other branches
- 8.4 src/GetLocationEvent.php \Drupal\smart_ip\GetLocationEvent
- 8.2 src/GetLocationEvent.php \Drupal\smart_ip\GetLocationEvent
Provides Smart IP query location override event for event listeners.
@package Drupal\smart_ip
Hierarchy
- class \Drupal\smart_ip\GetLocationEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of GetLocationEvent
6 files declare their use of GetLocationEvent
- SmartIpEventSubscriber.php in modules/
device_geolocation/ src/ EventSubscriber/ SmartIpEventSubscriber.php - Contains \Drupal\device_geolocation\EventSubscriber\SmartIpEventSubscriber.
- SmartIpEventSubscriber.php in modules/
smart_ip_maxmind_geoip2_bin_db/ src/ EventSubscriber/ SmartIpEventSubscriber.php - Contains \Drupal\smart_ip_maxmind_geoip2_bin_db\EventSubscriber\SmartIpEventSubscriber.
- SmartIpEventSubscriber.php in modules/
smart_ip_ipinfodb_web_service/ src/ EventSubscriber/ SmartIpEventSubscriber.php - Contains \Drupal\smart_ip_ipinfodb_web_service\EventSubscriber\SmartIpEventSubscriber.
- SmartIpEventSubscriber.php in modules/
smart_ip_ip2location_bin_db/ src/ EventSubscriber/ SmartIpEventSubscriber.php - Contains \Drupal\smart_ip_ip2location_bin_db\EventSubscriber\SmartIpEventSubscriber.
- SmartIpEventSubscriber.php in modules/
smart_ip_abstract_web_service/ src/ EventSubscriber/ SmartIpEventSubscriber.php - Contains \Drupal\smart_ip_abstract_web_service\EventSubscriber\SmartIpEventSubscriber.
1 string reference to 'GetLocationEvent'
1 service uses GetLocationEvent
File
- src/
GetLocationEvent.php, line 16 - Contains \Drupal\smart_ip\GetLocationEvent.
Namespace
Drupal\smart_ipView source
class GetLocationEvent extends Event {
/**
* Contains user's location.
*
* @var \Drupal\smart_ip\SmartIpLocationInterface
*/
protected $location;
/**
* Contains Smart IP data source info.
*
* @var string
*/
protected $dataSource;
/**
* Constructs a Smart IP event.
*
* @param \Drupal\smart_ip\SmartIpLocationInterface $location
* Smart IP's data location.
*/
public function __construct(SmartIpLocationInterface $location) {
$this
->setLocation($location);
$this->dataSource = \Drupal::config('smart_ip.settings')
->get('data_source');
}
/**
* Get Smart IP's data location.
*
* @return \Drupal\smart_ip\SmartIpLocationInterface
* Smart IP's data location.
*/
public function getLocation() {
return $this->location;
}
/**
* Set Smart IP's data location.
*
* @param \Drupal\smart_ip\SmartIpLocationInterface $location
* Smart IP's data location.
*/
public function setLocation(SmartIpLocationInterface $location) {
$this->location = $location;
}
/**
* Get Smart IP's data source.
*
* @return string
* Smart IP's data source.
*/
public function getDataSource() {
return $this->dataSource;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GetLocationEvent:: |
protected | property | Contains Smart IP data source info. | |
GetLocationEvent:: |
protected | property | Contains user's location. | |
GetLocationEvent:: |
public | function | Get Smart IP's data source. | |
GetLocationEvent:: |
public | function | Get Smart IP's data location. | |
GetLocationEvent:: |
public | function | Set Smart IP's data location. | |
GetLocationEvent:: |
public | function | Constructs a Smart IP event. |