SmartIpEventSubscriberBase.php in Smart IP 8.3
File
src/SmartIpEventSubscriberBase.php
View source
<?php
namespace Drupal\smart_ip;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
abstract class SmartIpEventSubscriberBase implements EventSubscriberInterface, SmartIpDataSourceInterface {
public function includeEditableConfigNames(AdminSettingsEvent $event) {
$configNames = $event
->getEditableConfigNames();
$configNames[] = $this
->configName();
$event
->setEditableConfigNames($configNames);
}
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;
}
}