CheckSettings.php in Security Review 8
File
src/CheckSettings.php
View source
<?php
namespace Drupal\security_review;
use Drupal\Core\Config\Config;
class CheckSettings implements CheckSettingsInterface {
protected $check;
protected $config;
public function __construct(Check $check, Config &$config) {
$this->check = $check;
$this->config = $config;
}
public function get($key, $default_value = NULL) {
$value = $this->config
->get('settings.' . $key);
if ($value == NULL) {
return $default_value;
}
return $value;
}
public function set($key, $value) {
$this->config
->set('settings.' . $key, $value);
$this->config
->save();
return $this;
}
public function buildForm() {
return [];
}
public function validateForm(array &$form, array $values) {
}
public function submitForm(array &$form, array $values) {
}
}
Classes
Name |
Description |
CheckSettings |
Defines the default implementation of CheckSettingsInterface. |