abstract class SmartIpEventSubscriberBase in Smart IP 8.2
Same name and namespace in other branches
- 8.4 src/SmartIpEventSubscriberBase.php \Drupal\smart_ip\SmartIpEventSubscriberBase
- 8.3 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
1 file declares its use of SmartIpEventSubscriberBase
- SmartIpEventSubscriber.php in modules/
smart_ip_ipinfodb_web_service/ src/ EventSubscriber/ SmartIpEventSubscriber.php - Contains \Drupal\smart_ip_ipinfodb_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][] = array(
'processQuery',
);
$events[SmartIpEvents::DISPLAY_SETTINGS][] = array(
'formSettings',
);
$events[SmartIpEvents::VALIDATE_SETTINGS][] = array(
'validateFormSettings',
);
$events[SmartIpEvents::SUBMIT_SETTINGS][] = array(
'submitFormSettings',
);
$events[SmartIpEvents::GET_CONFIG_NAME][] = array(
'includeEditableConfigNames',
);
$events[SmartIpEvents::MANUAL_UPDATE][] = array(
'manualUpdate',
);
$events[SmartIpEvents::CRON_RUN][] = array(
'cronRun',
);
return $events;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SmartIpDataSourceInterface:: |
public static | function | Get the config name of this Smart IP data source module. | 1 |
SmartIpDataSourceInterface:: |
public | function | Act on Drupal cron run. | 1 |
SmartIpDataSourceInterface:: |
public | function | Add the form elements of this Smart IP data source to main admin settings page of Smart IP. | 1 |
SmartIpDataSourceInterface:: |
public | function | Act on manual database update. | 1 |
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. | 1 |
SmartIpDataSourceInterface:: |
public static | function | Smart IP data source module's source ID. | 1 |
SmartIpDataSourceInterface:: |
public | function | Act on submission of main Smart IP admin settings form. | 1 |
SmartIpDataSourceInterface:: |
public | function | Act on validation of main Smart IP admin settings form. | 1 |
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:: |