SmartIpEventSubscriberBase.php in Smart IP 8.2
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][] = 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;
}
}