abstract class SmartIpEventSubscriberBase in Smart IP 8.3
Same name and namespace in other branches
- 8.4 src/SmartIpEventSubscriberBase.php \Drupal\smart_ip\SmartIpEventSubscriberBase
- 8.2 src/SmartIpEventSubscriberBase.php \Drupal\smart_ip\SmartIpEventSubscriberBase
Provides a base class for Smart IP data source modules.
Hierarchy
- class \Drupal\smart_ip\SmartIpEventSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface, SmartIpDataSourceInterface
Expanded class hierarchy of SmartIpEventSubscriberBase
6 files declare their use of SmartIpEventSubscriberBase
- 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.
File
- src/SmartIpEventSubscriberBase.php, line 15 
- Contains \Drupal\smart_ip\SmartIpEventSubscriberBase.
Namespace
Drupal\smart_ipView source
abstract class SmartIpEventSubscriberBase implements EventSubscriberInterface, SmartIpDataSourceInterface {
  /**
   * {@inheritdoc}
   */
  public function includeEditableConfigNames(AdminSettingsEvent $event) {
    $configNames = $event
      ->getEditableConfigNames();
    $configNames[] = $this
      ->configName();
    $event
      ->setEditableConfigNames($configNames);
  }
  /**
   * {@inheritdoc}
   */
  static function getSubscribedEvents() {
    $events[SmartIpEvents::QUERY_IP][] = [
      'processQuery',
    ];
    $events[SmartIpEvents::DISPLAY_SETTINGS][] = [
      'formSettings',
    ];
    $events[SmartIpEvents::VALIDATE_SETTINGS][] = [
      'validateFormSettings',
    ];
    $events[SmartIpEvents::SUBMIT_SETTINGS][] = [
      'submitFormSettings',
    ];
    $events[SmartIpEvents::GET_CONFIG_NAME][] = [
      'includeEditableConfigNames',
    ];
    $events[SmartIpEvents::MANUAL_UPDATE][] = [
      'manualUpdate',
    ];
    $events[SmartIpEvents::CRON_RUN][] = [
      'cronRun',
    ];
    return $events;
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| SmartIpDataSourceInterface:: | public static | function | Get the config name of this Smart IP data source module. | 6 | 
| SmartIpDataSourceInterface:: | public | function | Act on Drupal cron run. | 6 | 
| SmartIpDataSourceInterface:: | public | function | Add the form elements of this Smart IP data source to main admin settings page of Smart IP. | 6 | 
| SmartIpDataSourceInterface:: | public | function | Act on manual database update. | 6 | 
| SmartIpDataSourceInterface:: | public | function | Act on \Drupal\smart_ip\SmartIp::query() when executed and if selected as Smart IP data source, query the IP address against its database. | 6 | 
| SmartIpDataSourceInterface:: | public static | function | Smart IP data source module's source ID. | 6 | 
| SmartIpDataSourceInterface:: | public | function | Act on submission of main Smart IP admin settings form. | 6 | 
| SmartIpDataSourceInterface:: | public | function | Act on validation of main Smart IP admin settings form. | 6 | 
| SmartIpEventSubscriberBase:: | static | function | Returns an array of event names this subscriber wants to listen to. | |
| SmartIpEventSubscriberBase:: | public | function | Add Smart IP source module's config name. Overrides SmartIpDataSourceInterface:: | 
