You are here

interface SmartIpDataSourceInterface in Smart IP 8.2

Same name and namespace in other branches
  1. 8.4 src/SmartIpDataSourceInterface.php \Drupal\smart_ip\SmartIpDataSourceInterface
  2. 8.3 src/SmartIpDataSourceInterface.php \Drupal\smart_ip\SmartIpDataSourceInterface

Provides an interface for Smart IP's data source modules.

@package Drupal\smart_ip

Hierarchy

Expanded class hierarchy of SmartIpDataSourceInterface

All classes that implement SmartIpDataSourceInterface

File

src/SmartIpDataSourceInterface.php, line 17
Contains \Drupal\smart_ip\SmartIpDataSourceInterface.

Namespace

Drupal\smart_ip
View source
interface SmartIpDataSourceInterface {

  /**
   * Smart IP data source module's source ID.
   *
   * @return string
   */
  public static function sourceId();

  /**
   * Get the config name of this Smart IP data source module.
   *
   * @return string
   */
  public static function configName();

  /**
   * Act on \Drupal\smart_ip\SmartIp::query() when executed and if selected as
   * Smart IP data source, query the IP address against its database.
   *
   * @param \Drupal\smart_ip\GetLocationEvent $event
   */
  public function processQuery(GetLocationEvent $event);

  /**
   * Add Smart IP source module's config name.
   *
   * @param \Drupal\smart_ip\AdminSettingsEvent $event
   */
  public function includeEditableConfigNames(AdminSettingsEvent $event);

  /**
   * Add the form elements of this Smart IP data source to main admin settings
   * page of Smart IP.
   *
   * @param \Drupal\smart_ip\AdminSettingsEvent $event
   */
  public function formSettings(AdminSettingsEvent $event);

  /**
   * Act on validation of main Smart IP admin settings form.
   *
   * @param \Drupal\smart_ip\AdminSettingsEvent $event
   */
  public function validateFormSettings(AdminSettingsEvent $event);

  /**
   * Act on submission of main Smart IP admin settings form.
   *
   * @param \Drupal\smart_ip\AdminSettingsEvent $event
   */
  public function submitFormSettings(AdminSettingsEvent $event);

  /**
   * Act on manual database update.
   *
   * @param \Drupal\smart_ip\DatabaseFileEvent $event
   */
  public function manualUpdate(DatabaseFileEvent $event);

  /**
   * Act on Drupal cron run.
   *
   * @param \Drupal\smart_ip\DatabaseFileEvent $event
   */
  public function cronRun(DatabaseFileEvent $event);

}

Members

Namesort descending Modifiers Type Description Overrides
SmartIpDataSourceInterface::configName public static function Get the config name of this Smart IP data source module. 1
SmartIpDataSourceInterface::cronRun public function Act on Drupal cron run. 1
SmartIpDataSourceInterface::formSettings public function Add the form elements of this Smart IP data source to main admin settings page of Smart IP. 1
SmartIpDataSourceInterface::includeEditableConfigNames public function Add Smart IP source module's config name. 1
SmartIpDataSourceInterface::manualUpdate public function Act on manual database update. 1
SmartIpDataSourceInterface::processQuery 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. 1
SmartIpDataSourceInterface::sourceId public static function Smart IP data source module's source ID. 1
SmartIpDataSourceInterface::submitFormSettings public function Act on submission of main Smart IP admin settings form. 1
SmartIpDataSourceInterface::validateFormSettings public function Act on validation of main Smart IP admin settings form. 1