class Settings in Drupalmonitor 8
Class Settings.
@package Drupal\drupalmonitor
Hierarchy
- class \Drupal\drupalmonitor\Settings
Expanded class hierarchy of Settings
3 files declare their use of Settings
- drupalmonitor.install in ./
drupalmonitor.install - Installer file of drupalmonitor module
- DrupalMonitorController.php in src/
Controller/ DrupalMonitorController.php - SettingsForm.php in src/
Form/ SettingsForm.php
1 string reference to 'Settings'
1 service uses Settings
File
- src/
Settings.php, line 12
Namespace
Drupal\drupalmonitorView source
class Settings {
/**
* Config Name.
*/
const CONFIG_NAME = 'drupalmonitor.settings';
/**
* Config Key for Hash.
*/
const CONFIG_KEY_HASH = 'drupalmonitor_hash';
/**
* Config Key for Files Monitoring.
*/
const CONFIG_KEY_FILES_MONITORING = 'drupalmonitor_files_monitoring';
/**
* Config Key for Server Monitoring.
*/
const CONFIG_KEY_SERVER_MONITORING = 'drupalmonitor_server_monitoring';
/**
* Config Key for User Monitoring.
*/
const CONFIG_KEY_USER_MONITORING = 'drupalmonitor_user_monitoring';
/**
* Config Key for Node Monitoring.
*/
const CONFIG_KEY_NODE_MONITORING = 'drupalmonitor_node_monitoring';
/**
* Config Key for Modules Monitoring.
*/
const CONFIG_KEY_MODULES_MONITORING = 'drupalmonitor_modules_monitoring';
/**
* Config Key for Variables Monitoring.
*/
const CONFIG_KEY_VARIABLES_MONITORING = 'drupalmonitor_variables_monitoring';
/**
* Drupal\Core\Config\ConfigFactoryInterface definition.
*
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
protected $configFactory;
/**
* Settings.
*
* @var \Drupal\Core\Config\ImmutableConfig
*/
protected $settings;
/**
* Settings constructor.
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* Config Factory.
*/
public function __construct(ConfigFactoryInterface $config_factory) {
$this->configFactory = $config_factory;
$this->settings = $this->configFactory
->get(static::CONFIG_NAME);
}
/**
* Check whether Files Monitoring is enabled.
*
* @return bool
* TRUE if enabled, otherwise FALSE.
*/
public function isFilesMonitoringEnabled() {
return $this->settings
->get(static::CONFIG_KEY_FILES_MONITORING);
}
/**
* Check whether Server Monitoring is enabled.
*
* @return bool
* TRUE if enabled, otherwise FALSE.
*/
public function isServerMonitoringEnabled() {
return $this->settings
->get(static::CONFIG_KEY_SERVER_MONITORING);
}
/**
* Check whether User Monitoring is enabled.
*
* @return bool
* TRUE if enabled, otherwise FALSE.
*/
public function isUserMonitoringEnabled() {
return $this->settings
->get(static::CONFIG_KEY_USER_MONITORING);
}
/**
* Check whether Node Monitoring is enabled.
*
* @return bool
* TRUE if enabled, otherwise FALSE.
*/
public function isNodeMonitoringEnabled() {
return $this->settings
->get(static::CONFIG_KEY_NODE_MONITORING);
}
/**
* Check whether Modules Monitoring is enabled.
*
* @return bool
* TRUE if enabled, otherwise FALSE.
*/
public function isModulesMonitoringEnabled() {
return $this->settings
->get(static::CONFIG_KEY_MODULES_MONITORING);
}
/**
* Check whether Variables Monitoring is enabled.
*
* @return bool
* TRUE if enabled, otherwise FALSE.
*/
public function isVariablesMonitoringEnabled() {
return $this->settings
->get(static::CONFIG_KEY_VARIABLES_MONITORING);
}
/**
* Get Hash.
*
* @return string|null
* Hash.
*/
public function getHash() {
return $this->settings
->get(static::CONFIG_KEY_HASH);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Settings:: |
protected | property | Drupal\Core\Config\ConfigFactoryInterface definition. | |
Settings:: |
protected | property | Settings. | |
Settings:: |
constant | Config Key for Files Monitoring. | ||
Settings:: |
constant | Config Key for Hash. | ||
Settings:: |
constant | Config Key for Modules Monitoring. | ||
Settings:: |
constant | Config Key for Node Monitoring. | ||
Settings:: |
constant | Config Key for Server Monitoring. | ||
Settings:: |
constant | Config Key for User Monitoring. | ||
Settings:: |
constant | Config Key for Variables Monitoring. | ||
Settings:: |
constant | Config Name. | ||
Settings:: |
public | function | Get Hash. | |
Settings:: |
public | function | Check whether Files Monitoring is enabled. | |
Settings:: |
public | function | Check whether Modules Monitoring is enabled. | |
Settings:: |
public | function | Check whether Node Monitoring is enabled. | |
Settings:: |
public | function | Check whether Server Monitoring is enabled. | |
Settings:: |
public | function | Check whether User Monitoring is enabled. | |
Settings:: |
public | function | Check whether Variables Monitoring is enabled. | |
Settings:: |
public | function | Settings constructor. |